add unserialize() method

build a tree from the json structure given