JSON / XML response helpers.