Error messages due to error in json file

I am writing some json for a custom chart. I noticed that error messages are not informative in the sense that there are no line numbers associated to the error. Vegalite programs can already contain no documentation (i.e., no comments) without playing tricks. Is it possible to find out where an error occurs in a json file?

Here is my error message:

TypeError: undefined is not an object (evaluating 'tt.not')


Hey @erlebacher,

You can view all Vegalite documentation here. Here are a few recommendations to find out where an error is in a json file:

  1. Validate the JSON: Before looking for errors, it’s important to ensure that the JSON is valid. You can use online JSON validators or various JSON parsing libraries such as jsonschema or json-spec

  2. Debugging and iterative approach: Since JSON files are typically used as configuration or data files, one common approach is to use a trial-and-error method. Start by removing or commenting out parts of the JSON file and gradually reintroduce them until the error occurs. By doing this, you can narrow down the problematic section of the JSON file.

While JSON itself does not provide built-in line numbers or extensive error messages, following these steps can help you locate errors within a JSON file by validating its structure, understanding the expected format, and iteratively narrowing down the problematic section.

Hi Gordon,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.



This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.