Translate a newick tree to JSON