Skip to content

Instantly share code, notes, and snippets.

@tmr111116
Created December 12, 2014 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmr111116/2ccbbbed1ffe8091df88 to your computer and use it in GitHub Desktop.
Save tmr111116/2ccbbbed1ffe8091df88 to your computer and use it in GitHub Desktop.
cocostudio から書き出された JSON の中身を雑に見る。
ruby -r json -e 'def f(o, i=0); oc = o["options"]["classname"]; on = o["options"]["name"]; print " " * i + "#{oc}, #{on}\n"; o["children"].each{|c| f c, i+2}; nil; end; ARGV.each {|j| p j; f JSON.load(open(j).read)["widgetTree"]}' *.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment