fixed when write json Infinite recursion