JSON
JSON (JavaScript Object Notation) is a lightweight text format for structured data, built from key-value pairs and ordered lists, used by most web APIs.
Also called: JavaScript Object Notation, JSON payload, JSON object
JSON, short for JavaScript Object Notation, is a plain-text format for structured data built from key-value pairs and lists. Nearly every API request, API response and webhook in a GTM stack is JSON. If you can read it, you can see exactly what one tool sent another, which turns most "the automation broke" mysteries into a two-minute fix.
How it works
JSON has six value types: strings in double quotes, numbers, booleans (true or false), null, objects in curly braces and arrays in square brackets. Objects hold named fields. Arrays hold ordered lists. They nest freely:
{
"company": {
"name": "Acme Robotics",
"domain": "acmerobotics.example",
"employees": 240
},
"contacts": [
{ "email": "ana@acmerobotics.example", "title": "VP Sales" },
{ "email": "raj@acmerobotics.example", "title": "RevOps Lead" }
],
"is_customer": false
}
Automation tools reference values by path. Here company.domain returns the domain, and contacts[0].email returns the first contact's email. When you map a webhook payload into a CRM, you're really writing paths like these during field mapping.
Example
Say an API returns one company with 3 contacts nested in an array, and you need one CRM row per contact. If you map contacts[0].email directly, you get 1 contact and silently lose 2. Across 400 companies averaging 3 contacts each (assumption), that's 1,200 contacts expected and only 400 created, a 67% loss nobody notices until a rep asks why the account is empty.
The fix is to loop or split the array so each item becomes its own run: 400 companies x 3 contacts = 1,200 records, each carrying the parent company's domain for matching. Reading the raw JSON first would have shown the array immediately.
JSON vs CSV
CSV is flat: rows and columns, perfect for CSV imports and spreadsheets. JSON keeps relationships, so a company and its contacts travel together. Converting JSON to CSV means flattening, which forces choices about arrays: one row per contact, or one column per contact, or a joined text field.
JSON also matters for AI work. Structured output means asking a model to return valid JSON against a schema, so the next workflow step can read fields reliably instead of parsing prose.
Common mistakes
- Trailing commas or single quotes, which make JSON invalid even though it looks fine.
- Numbers or booleans arriving as strings, like
"240"or"false", which break filters and math. - Treating
null, an empty string and a missing field as the same thing. - Mapping the first item of an array and dropping the rest.
- Hardcoding a deep path that changes when the vendor updates its payload.
- Logging full payloads with personal data into places that shouldn't hold it.
FAQ
What is JSON used for?
JSON is used to send data between systems, especially in API requests, API responses and webhook payloads. It's also common for configuration files, exported automation workflows and structured output from AI models.
What is the difference between JSON and CSV?
CSV is a flat table of rows and columns, which suits spreadsheets and bulk imports. JSON handles nesting, like a company with a list of contacts inside it, which is why APIs prefer it.
Do you need to know JSON to use automation tools?
You can build simple workflows without it, but reading JSON makes debugging much faster. Most automation errors come from a field path pointing to the wrong place in a payload or a value arriving as the wrong type.
Related
Used in these articles
- ArticleMake.com for GTM Teams: Scenarios, Credits and Five Recipes Worth Building
- ArticleAPIs for GTM Teams: What You Need to Know Before You Build
- Articlen8n for GTM Teams: Workflows Worth Building First
- ArticleLead-to-Account Matching: Rules That Work in HubSpot and Beyond
- ArticleRAG for Sales Teams: Give AI Your Docs Without Making Things Up
- ArticleStructured Outputs: Make AI Return Data Your CRM Can Use
Sources