module Roda::RodaPlugins::Json::RequestMethods
Private Instance Methods
Source
# File lib/roda/plugins/json.rb, line 102 def convert_to_json(result) opts = roda_class.opts serializer = opts[:json_result_serializer] if opts[:json_result_include_request] serializer.call(result, self) else serializer.call(result) end end
Convert the given object to JSON. Uses to_json by default, but can use a custom serializer passed to the plugin.