module Roda::RodaPlugins::Json::RequestMethods
def block_result_body(result)
convert the result to json and return it as the body, using the
If the result is an instance of one of the json_result_classes,
def block_result_body(result) case result when *roda_class.json_result_classes response[CONTENT_TYPE] = APPLICATION_JSON convert_to_json(result) else super end end
def convert_to_json(obj)
Convert the given object to JSON. Uses to_json by default,
def convert_to_json(obj) obj.to_json end