开发者

Parse a JSON Object

I have a JSON object like the following:

{
 "a" : "test", 
 "b" : "test", 
 "c" : [{"d": "test data", "f": ['e','f','g']}, 
      开发者_开发百科  {"f": "test data", "f": ['e','f','g']}
       ], 
  "d" : [{"g": "test data", "f": ['e','f','g']}, 
         {"h": "test data", "f": ['e','f','g']}
        ]  
}

I need to parse this and display it in a tree format. Could somebody show some direction please. I am working on ruby.


For a JSON parser, look at JSON.org

Listed there:

  • json
  • yajl-ruby
  • json-stream
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜