Module: ActiveSupport::JSON::Encoding
- Defined in:
- lib/active_support/json/encoding.rb
Overview
:nodoc:
Defined Under Namespace
Classes: JSONGemEncoder
Class Attribute Summary collapse
- 
  
    
      .escape_html_entities_in_json  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    If true, encode >, <, & as escaped unicode sequences (e.g. > as u003e) as a safety measure. 
- 
  
    
      .json_encoder  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Sets the encoder used by Rails to encode Ruby objects into JSON strings in Object#to_json and ActiveSupport::JSON.encode.
- 
  
    
      .time_precision  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Sets the precision of encoded time values. 
- 
  
    
      .use_standard_json_time_format  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    If true, use ISO 8601 format for dates and times. 
Class Attribute Details
.escape_html_entities_in_json ⇒ Object
If true, encode >, <, & as escaped unicode sequences (e.g. > as u003e) as a safety measure.
| 110 111 112 | # File 'lib/active_support/json/encoding.rb', line 110 def escape_html_entities_in_json @escape_html_entities_in_json end | 
.json_encoder ⇒ Object
Sets the encoder used by Rails to encode Ruby objects into JSON strings in Object#to_json and ActiveSupport::JSON.encode.
| 118 119 120 | # File 'lib/active_support/json/encoding.rb', line 118 def json_encoder @json_encoder end | 
.time_precision ⇒ Object
Sets the precision of encoded time values. Defaults to 3 (equivalent to millisecond precision)
| 114 115 116 | # File 'lib/active_support/json/encoding.rb', line 114 def time_precision @time_precision end | 
.use_standard_json_time_format ⇒ Object
If true, use ISO 8601 format for dates and times. Otherwise, fall back to the Active Support legacy format.
| 106 107 108 | # File 'lib/active_support/json/encoding.rb', line 106 def use_standard_json_time_format @use_standard_json_time_format end |