JSON Training
Ashley Kim
Operations Associate
8 July 2025
What is JSON?
● JSON = JavaScript Object Notation
● Based on JavaScript syntax for creating objects
○ Curly braces { } for objects
○ Square brackets [ ] for arrays
○ Key-value pairs separated by commas
What is JSON?
What is JSON?
● A simple way to store and organize data
● Uses text that humans can read and computers can understand
● Like a digital filing cabinet with labeled folders and contents
● Widely used across the internet and in our annotation project
Why JSON?
● We use JSON to organize planning data:
○ Constraints: Rules and requirements (like "budget under $500")
○ Primitives: Available options (like flights, hotels, recipes)
○ Solutions: The final plan that follows all the rules
JSON Basics - Structure
● Curly braces { } wrap the whole thing
● Key-value pairs store information
● Keys are always in quotes (like "name")
● Values come after a colon
JSON Data Types
● JSON stores different kinds of information:
○ Text (strings): Always in quotes
○ Numbers: No quotes needed
○ True/False: Use lowercase true or false
○ Nothing: Use null
JSON Lists (Arrays)
● Use square brackets for lists
○ Lists can contain multiple items
○ Separate items with commas
○ Lists can contain any data type
Nested JSON Objects
● JSON can contain other JSON objects
Example- Flight Data
● Here’s how we store flight information:
○ Each piece of flight information has its own key-value pair
Example - Multiple Flights in a List
Example - Constraints
● Each constraint becomes a key-value pair
JSON Formatting Rules
● Always use double quotes for text: "correct" not 'wrong'
● Add commas between items (but not after the last item)
● Match your brackets: Every { needs a } and every [ needs a ]
● No trailing commas: Don't put commas after the last item
Reading JSON in Our Project
● When reading JSON, ask yourself:
○ What type of data is this? (constraints, primitives, or solution)
○ What are the main categories? (flights, hotels, recipes, etc.)
○ What attributes does each item have? (price, duration, ingredients,
etc.)
○ Are there any lists or nested objects?
Your JSON Tasks
● In this project, you will:
○ Read JSON metadata to understand constraints and primitives
○ Analyze how JSON data relates to natural language prompts
○ Verify that prompts include all information from the JSON
○ Report issues when JSON data doesn't make sense
What Does This JSON Tell You?
What Does This JSON Tell You?
● These are trip planning constraints limiting hotel price, requiring New York
City as a destination, setting minimum departure time, and maximum total
flight time.