json-parser: propagate error from parser