File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 143143#   ruby = JSON.parse(source, {allow_nan: true}) 
144144#   ruby # => [NaN, Infinity, -Infinity] 
145145# 
146+ # --- 
147+ # 
148+ # Option +allow_trailing_comma+ (boolean) specifies whether to allow 
149+ # trailing commas in objects and arrays; 
150+ # defaults to +false+. 
151+ # 
152+ # With the default, +false+: 
153+ #   JSON.parse('[1,]') # unexpected character: ']' at line 1 column 4 (JSON::ParserError) 
154+ # 
155+ # When enabled: 
156+ #   JSON.parse('[1,]', allow_trailing_comma: true) # => [1] 
157+ # 
146158# ====== Output Options 
147159# 
160+ # Option +freeze+ (boolean) specifies whether the returned objects will be frozen; 
161+ # defaults to +false+. 
162+ # 
148163# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys 
149164# should be Symbols; 
150165# defaults to +false+ (use Strings). 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments