Reduce garbage in Json tree conversion, close #1010