You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes JSON data can be inconsistent (Ex: bad APIs). One field can be string in one row, in another float64. It would help to figure out what field is responsible if there was at least the offset from the JSON file associated with the reported error.
Suppose there is a data.json file that contains 10k rows and row 1230 has field HSigma a float64 instead of string. The error reported when unmarshalling would be:
json: cannot unmarshal string into Go value of type float64
Which is not very useful since we have a few string fields and we don't know the row. Instead something like this would tell me where I should look in my json file:
json: cannot unmarshal 'string' into Go value of type 'float64' offset 7427
The text was updated successfully, but these errors were encountered:
Sometimes JSON data can be inconsistent (Ex: bad APIs). One field can be string in one row, in another float64. It would help to figure out what field is responsible if there was at least the
offset
from the JSON file associated with the reported error.Example:
Suppose there is a data.json file that contains 10k rows and row 1230 has field HSigma a float64 instead of string. The error reported when unmarshalling would be:
json: cannot unmarshal string into Go value of type float64
Which is not very useful since we have a few string fields and we don't know the row. Instead something like this would tell me where I should look in my json file:
json: cannot unmarshal 'string' into Go value of type 'float64' offset 7427
The text was updated successfully, but these errors were encountered: