Module: ActionController::JsonRender
- Defined in:
- runtime/action_controller/json_render.rb
Constant Summary collapse
- JSON_ESCAPES =
{ "\"" => "\\\"", "\\" => "\\\\", "\b" => "\\b", "\f" => "\\f", "\n" => "\\n", "\r" => "\\r", "\t" => "\\t" }.freeze
Class Method Summary collapse
-
.encode(value) ⇒ String
the JSON text behind
render json::as_jsonfirst, then a structural walk and hand-written JSON text.
Class Method Details
.encode(value) ⇒ String
the JSON text behind render json:: as_json first, then a structural
walk and hand-written JSON text.
25 26 27 |
# File 'runtime/action_controller/json_render.rb', line 25 def self.encode(value) emit_json(jsonify(value)) end |