The structure of JSON

JSON supports six data types: strings, numbers, booleans, null, objects (key-value pairs) and arrays. That is enough for any data structure in e-commerce.

{
  "item_id": "SKU-42819",
  "name": "Running shoes",
  "price": 89.90,
  "in_stock": true,
  "categories": ["Footwear", "Sport", "Running"],
  "attributes": {
    "brand": "RunFast",
    "color": "blue",
    "sizes_available": [40, 41, 42, 43]
  }
}

That fragment is a typical product record. Nested objects and arrays carry hierarchical data with no extra conventions.

JSON in personalization platforms

Personalization platforms use JSON in three main places.

Recommendation API responses. The request: GET /recommendations?user_id=123&widget=pdp. The response is a JSON array of products, each with id, title, price, image_url and score. The frontend renders the widget from that array.

Event delivery. Every user action — a view, a click, a purchase — is sent as a JSON object to the Event API. The fields: event type, item identifier, timestamp, user or session identifier.

Product feed. The catalogue is delivered as JSON or JSONL for the initial load and for incremental updates into the recommendation models.

Important: agree the JSON event schema with the platform during integration and pin it down as a JSON Schema. Field renames — product_id becoming item_id, say — break tracking silently when the schema is not updated, with no visible errors in the logs.