vespa-engine / vespa

AI + Data, online. https://vespa.ai
https://vespa.ai
Apache License 2.0
5.78k stars 604 forks source link

JSON parser in more strict in 8 than 7 ? #23902

Closed lundin closed 2 years ago

lundin commented 2 years ago

Hi , am i right that the json parser is more strict in Vespa 8 than 7 ? We migrated our DEV instance and some of our YQL started to return

{"root":{"id":"toplevel","relevance":1.0,"fields":{"totalCount":0},"errors":[{"code":3,"summary":"Illegal query","message":"Json parse error.: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value\n

This is ofc our own fault creating non valid json in the editor by creating newlines (for readability), but we escaped numbers and terms in the string building however not newlines or similar. A "wont-fix" is understandable but if the json parser could allow some common misstakes (like it did in v7) it would be good.

There was also a array field that started to return: "error_message" : "input underflow", "offending_offset" : 0, "partial_result" : null that we had not seen before, but i have to check more on that. Do you know what that can be related to ?

Environment (please complete the following information): Vespa Cloud

Vespa version Vespa v 8.46.19

bjorncs commented 2 years ago