small improvements in json-parser