Categories: None [Edit]

lazy-pp-json

https://rubygems.org/gems/lazy-pp-json
Lazy pp json responses. ### JSON#pretty_generate ```ruby example_json = "[[0,1395671860.99505,2.50339508056641e-05],{"alloc_count":136,"starttime":1395671856,"uptime":4,"version":"4.0.0","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]" puts JSON.pretty_generate(JSON.parse(example_json)) #=> # [ # [ # 0, # 1395671860.99505, # 2.50339508056641e-05 # ], # { # "alloc_count": 136, # "starttime": 1395671856, # "uptime": 4, # "version": "4.0.0", # "n_queries": 0, # "cache_hit_rate": 0.0, # "command_version": 1, # "default_command_version": 1, # "max_command_version": 2 # } # ] ``` ### lazy-pp-json ```ruby example_json = "[[0,1395671860.99505,2.50339508056641e-05],{"alloc_count":136,"starttime":1395671856,"uptime":4,"version":"4.0.0","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]" pp Lazy::PP::JSON.new(example_json) #=> [ [0, 1395671860.99505, 2.50339508056641e-05], { "alloc_count" :136, "starttime" :1395671856, "uptime" :4, "version" :"4.0.0", "n_queries" :0, "cache_hit_rate" :0.0, "command_version" :1, "default_command_version":1, "max_command_version" :2 } ] ```

Total

Ranking: 64,136 of 180,507
Downloads: 13,669

Daily

Ranking: 45,181 of 180,487
Downloads: 10

Depended by

RankDownloadsName
70,40811,921grnline

Depends on

RankDownloadsName
12,082,629,206bundler
16855,753,735rake
17812,635,923json
63859,381,871test-unit
8,074326,751test-unit-notify

Owners

#GravatarHandle
1iconyoshihara