Method: TreeNode.from_json

Defined in:
lib/cli-tree.rb

.from_json(json) ⇒ Object



23
24
25
26
# File 'lib/cli-tree.rb', line 23

def TreeNode.from_json(json)
  hash = JSON.parse json, symbolize_names: true
  TreeNode.from_h hash
end