Use json-documents ring handler to parse and output json, depending on declared content types.