Using JSON
JSON (JavaScript Object Notation) is a way to store information in an organized, easy-to-access manner. In summary, it gives us a human-readable collection of data that can be accessed in a really logical manner. For more information about JSON, see JSON Basics: What You Need to Know.
Below are some tips for editing JSON files.
- Use a text editor that supports syntax highlighting and JSON parsing (for example, ATOM).
- You might find it useful to configure one attribute at a time, save the file, refresh the product list, then check it in the Operator interface. This way you can see what you are building and also detect any syntax errors as they occur.
- Make sure you save the file with the extension .json and NOT .txt.
-
In JSON, the last object in an array does not have a comma. For example:
If you copy and paste an existing line or element, make sure you check the commas.
-
If you have problems with the JSON syntax, there is a log file that captures the line number of any errors in the file. You can find this log file at:
<install path>/job-ticketing/log/job-ticketing.log
To find details of the problems, search the log file for either the time you restarted the Job Ticketing service, or the name of the json file.