开发者

Change JSON formatting

The following two pages provide the same JSON object. Is it possible to have the Facebook Style JSON formatting for my rails application??

Desired formatting:

https://graph.facebook.com/192928开发者_如何学Go68552

My Application formatting:

http://sframework.heroku.com/api/graphs

Thanks


Ruby json library has a pretty_generate function.

require 'json'
puts JSON.pretty_generate(fbJson)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜