def json_response(response_code, data, options = {})
      options = { pretty: true }.merge(options)
      do_pretty_json = !!options.delete(:pretty) # make sure we have a proper Boolean.
      json = FFI_Yajl::Encoder.encode(data, pretty: do_pretty_json)
      already_json_response(response_code, json, options)
    end
def json_response(response_code, data, options = {})
      options = { pretty: true }.merge(options)
      do_pretty_json = !!options.delete(:pretty) # make sure we have a proper Boolean.
      json = FFI_Yajl::Encoder.encode(data, pretty: do_pretty_json)
      already_json_response(response_code, json, options)
    end
Serializes `data` to JSON and returns an Array with the
 response code, HTTP headers and JSON body.

 @param [Fixnum] response_code HTTP response code
 @param [Hash] data The data for the response body as a Hash
 @param [Hash] options
 @option options [Hash] :headers (see #already_json_response)
 @option options [Boolean] :pretty (true) Pretty-format the JSON
 @option options [Fixnum] :request_version (see #already_json_response)
 @option options [Fixnum] :response_version (see #already_json_response)

 @return (see #already_json_response)