fix bug in json-to-object