Categories: None [Edit]
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,276 of 188,779
Downloads: 15,965
Daily
Ranking: 34,125 of 188,757
Downloads: 3
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|---|---|
| 70,957 | 13,817 | grnline |
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 1 | 3,120,857,398 | bundler |
| 10 | 1,202,684,222 | rake |
| 12 | 1,175,789,890 | json |
| 624 | 83,075,004 | test-unit |
| 8,895 | 384,205 | test-unit-notify |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | yoshihara |