Format Json and xml response