-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing errors due to inconsistent data types in JSON #964
Comments
Hi Ivana.. in such cases, the quick workaround is to set the field type as string. ( If we know that the field is of such mixed types ). Even though this doesn't solve the problem, it will help to skip the error and not ideal in all the situations. Thanks, |
This URL is the one that brought this to our attention. It works with the frontend parser in Infinity, but fails with the backend parser. The user needs to use the backend parser so that they can configure alerting. On my local instance, attempting to parse that URL with the backend parser results in:
Also note that the only error in the frontend in this case is "the plugin encountered an error" - which could be improved to help a user attempting to troubleshoot this, without access to the backend debug logs. |
I have done investigation and found the root cause of the issue. The problem when querying The workaround would be just using Unfortunately, there is no way to get information on what field is causing an issue right now. We should improve that and return more user friendly error. To properly fix this, we should have a better logic to get field type from more values, but here the downside would be performance burden, as looping over a lot of values is going to take much more time than just 1 value. Maybe we could check first X non-null values? |
Malformed or inconsistent JSON can cause parsing errors. When values have inconsistent data types, the parser may fail—for instance, if a certain key is expected to be a number but occasionally appears as a string. This type mismatch can lead to type conversion issues and cause the parser to break.
Related to this.
The text was updated successfully, but these errors were encountered: