Flexible json responses

This will become 2.3 soon.