How to return JSON

Sorry, but I could not understand the documentation