Added helpers for json/xml responses