Elysia Tools

Browse tools, examples, visual explainers, and topic guides from one clear workspace.

Top Categories

Hubs

Language
ZHESPTRUFRDEEN

Elysia Tools

Navigation

Data Formats

JSON examples: nested data, types and empty values

Choose JSON objects, arrays, API responses and a downloadable dataset; test nested paths, null values and array counts.

Samples

Entries inside this sample collection

JSONjsonSimple

Simple JSON Object

Basic JSON object with key-value pairs

json
{
  "name": "John Doe",
  "age": 30,
  "isStudent": false,
  "email": "[email protected]"
}
JSONjsonSimple

JSON Array

JSON array containing multiple values

json
[
  "apple",
  "banana",
  "cherry",
  "date",
  "elderberry"
]
JSONjsonIntermediate

JSON Array of Objects

JSON array containing multiple objects

json
[
  {
    "id": 1,
    "name": "Alice",
    "age": 25,
    "city": "New York"
  },
  {
    "id": 2,
    "name": "Bob",
    "age": 30,
    "city": "London"
  },
  {
    "id": 3,
    "name": "Charlie",
    "age": 35,
    "city": "Tokyo"
  }
]
JSONjsonIntermediate

Nested JSON Object

JSON object containing nested objects

json
{
  "user": {
    "name": "John Doe",
    "profile": {
      "age": 30,
      "gender": "male",
      "address": {
        "street": "123 Main St",
        "city": "New York",
        "country": "USA"
      }
    }
  }
}
JSONjsonIntermediate

JSON with Mixed Types

JSON object with various data types including arrays, objects, and primitives

json
{
  "name": "Product Catalog",
  "version": 1.0,
  "isActive": true,
  "products": [
    {
      "id": "P001",
      "name": "Laptop",
      "price": 999.99,
      "inStock": 10,
      "tags": ["electronics", "computers"]
    },
    {
      "id": "P002",
      "name": "Smartphone",
      "price": 599.99,
      "inStock": 25,
      "tags": ["electronics", "mobile"]
    }
  ],
  "lastUpdated": "2025-01-01T12:00:00Z"
}
JSONjsonComplex

Complex JSON Structure

Complex JSON with nested arrays, objects, and various data types

json
{
  "company": {
    "name": "Tech Corp",
    "founded": 2000,
    "industry": "Technology",
    "location": {
      "country": "USA",
      "city": "San Francisco",
      "coordinates": {
        "lat": 37.7749,
        "lng": -122.4194
      }
    },
    "departments": [
      {
        "name": "Engineering",
        "head": "Alice Smith",
        "employees": [
          {
            "id": "EMP001",
            "name": "Bob Johnson",
            "position": "Software Engineer",
            "skills": ["JavaScript", "Python", "React"]
          },
          {
            "id": "EMP002",
            "name": "Charlie Davis",
            "position": "Backend Developer",
            "skills": ["Go", "Node.js", "PostgreSQL"]
          }
        ],
        "projects": [
          {
            "name": "Project Alpha",
            "status": "active",
            "deadline": "2025-06-01"
          },
          {
            "name": "Project Beta",
            "status": "planning",
            "deadline": "2025-09-01"
          }
        ]
      },
      {
        "name": "Marketing",
        "head": "Diana Evans",
        "employees": [
          {
            "id": "EMP003",
            "name": "Ethan Wilson",
            "position": "Marketing Manager",
            "skills": ["Digital Marketing", "SEO", "Social Media"]
          }
        ],
        "projects": [
          {
            "name": "Campaign X",
            "status": "active",
            "deadline": "2025-05-15"
          }
        ]
      }
    ],
    "financials": {
      "revenue": 1000000000,
      "profit": 150000000,
      "expenses": 850000000,
      "quarters": [
        { "quarter": 1, "revenue": 240000000, "profit": 35000000 },
        { "quarter": 2, "revenue": 250000000, "profit": 40000000 },
        { "quarter": 3, "revenue": 260000000, "profit": 45000000 },
        { "quarter": 4, "revenue": 250000000, "profit": 30000000 }
      ]
    },
    "tags": ["tech", "innovation", "growth"]
  }
}
JSONjsonIntermediate

API Response JSON

Standard JSON structure for API responses

json
{
  "status": "success",
  "code": 200,
  "message": "Request processed successfully",
  "timestamp": "2025-01-01T12:00:00Z",
  "data": {
    "user": {
      "id": "USER12345",
      "name": "John Doe",
      "email": "[email protected]",
      "profile": {
        "age": 30,
        "gender": "male",
        "joinedAt": "2024-01-01T00:00:00Z"
      },
      "roles": ["user", "subscriber"]
    }
  },
  "pagination": {
    "currentPage": 1,
    "totalPages": 5,
    "totalItems": 45,
    "itemsPerPage": 10
  },
  "meta": {
    "requestId": "REQ-789012",
    "version": "1.0.0"
  }
}
JSONjsonIntermediate

Configuration JSON

JSON used for configuration settings

json
{
  "app": {
    "name": "My Application",
    "version": "1.2.3",
    "environment": "production",
    "debug": false,
    "port": 3000
  },
  "database": {
    "type": "postgres",
    "host": "localhost",
    "port": 5432,
    "name": "myapp_db",
    "credentials": {
      "username": "db_user",
      "password": "DB_PASSWORD",
      "ssl": true
    },
    "pool": {
      "min": 2,
      "max": 10
    }
  },
  "logging": {
    "level": "info",
    "format": "json",
    "outputs": ["console", "file"],
    "file": {
      "path": "/var/log/myapp.log",
      "maxSize": "10MB",
      "maxFiles": 5
    }
  },
  "security": {
    "cors": {
      "enabled": true,
      "origins": ["https://elysiatools.com", "https://app.example.com"],
      "methods": ["GET", "POST", "PUT", "DELETE"]
    },
    "jwt": {
      "secret": "JWT_SECRET",
      "expiresIn": "7d"
    }
  },
  "services": {
    "payment": {
      "gateway": "stripe",
      "apiKey": "STRIPE_API_KEY",
      "webhookSecret": "STRIPE_WEBHOOK_SECRET"
    },
    "email": {
      "provider": "sendgrid",
      "apiKey": "SENDGRID_API_KEY",
      "from": "[email protected]"
    }
  }
}
JSONjsonComplex

GeoJSON Example

GeoJSON format for representing geographical data

json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "name": "San Francisco",
        "population": 873965,
        "cityClass": "major"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [-122.4194, 37.7749]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "name": "New York City",
        "population": 8804190,
        "cityClass": "major"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [-74.006, 40.7128]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "name": "Los Angeles",
        "population": 3898747,
        "cityClass": "major"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [-118.2437, 34.0522]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "name": "California",
        "state": "CA"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [-124.48201944037265, 40.440630133689096],
            [-124.38966410701322, 37.18018892607658],
            [-122.2344979653738, 36.99742992327278],
            [-114.13122416650424, 32.534136409845824],
            [-114.6399218947989, 40.39573804578282],
            [-124.48201944037265, 40.440630133689096]
          ]
        ]
      }
    }
  ]
}
JSONjsonSimple

JSON with Empty Values

JSON showing various empty value representations

json
{
  "emptyString": "",
  "nullValue": null,
  "emptyArray": [],
  "emptyObject": {},
  "zeroNumber": 0,
  "zeroDecimal": 0.0,
  "falseBoolean": false
}
FilejsonSimple

Sample JSON File

A compact JSON file with objects, arrays, nesting, and mixed value types for the JSON Viewer

Difficulty

1/10

Tags

json, viewer, file, basic

simple.json

JSON · 544 B

Download fileOpen in new tab
fileSize
544 B
format
JSON
extension
.json
encoding
UTF-8

Tools

Tools frequently paired with this sample

Related

Related sample collections

Related

Related workflows

Tool usage guide

Sample-focused context for search and workflow understanding

Overview

A JSON parser can accept a document even when an importer reads the wrong field or discards a meaningful zero. Use these examples to separate syntax checks from data checks, beginning with a small object and progressing to nested records.

Pick a structure before choosing a tool

The code cards are copyable examples. The separate file card supplies simple.json for download or opening in a new tab. Its contents differ from the simple-object card; use the correct fixture when comparing results. Expand a collapsed code block before inspecting it, then copy the complete document into your own JSON parser or editor.

Pick a structure before choosing a tool
Sample cardChoose it for
«Simple JSON Object»Four named properties and primitive types
«JSON Array of Objects»Three records with the same keys
«Nested JSON Object»A deeply nested city field
«JSON with Empty Values»Null, empty containers, zero and false
«API Response JSON»Response wrapper, roles and pagination
«Sample JSON File»Downloadable simple.json: 544 bytes, three items

Parsing preserves types; your application assigns meaning

JSON objects use quoted property names; arrays preserve item order. Numbers, booleans and null are distinct from quoted text. Dates such as lastUpdated remain strings after JSON parsing. A successful parse does not validate an email address, establish a date type or confirm an API contract.

For imports, check the root shape and nested path first. «API Response JSON» places the user under data.user; pagination.totalItems describes a claimed collection size, not the number of user objects present in this document. Keep this distinction when mapping a response into rows.

Which tools to test with these samples

Use these files with a JSON Formatter to check structure, a JSON Minifier to measure payload size, JSON to CSV and JSON to XML converters to test field mapping, and a JSON Diff Visualizer to compare two documents. The nested objects and arrays expose path handling; the null and empty values expose how a tool treats missing data.

Every file in this set is JSON. The samples cover nested objects, arrays, numbers, booleans, null and empty values, plus an API-style response with pagination — the same shapes a formatter or converter meets in real imports.

How it works

  1. 1Copy one complete code card, or download the separate JSON file; avoid combining adjacent examples.
  2. 2Parse with a standard JSON parser and inspect the resulting values and types in your own tool.
  3. 3Run the relevant checks below, then serialize and parse again if testing a conversion; compare structure rather than whitespace.

Edge cases & common failures

  • Formatting is not a semantic check

    A formatter may change indentation or write 0.0 as 0. Compare parsed values; require a schema separately if fields must be present.

  • Examples are finite fixtures

    The API card is illustrative rather than a live endpoint. It does not exercise network errors, streaming, very large integers or large-file memory behavior.

Examples

1. Follow a nested path

How to use

Copy «Nested JSON Object», parse it, and inspect user.profile.address.city. Compare this with a lookup of city directly on the root object.

Outcome

The nested path returns New York; the root has no city property. A blank imported city therefore indicates a mapping problem even though the JSON syntax is valid.

2. Preserve the seven empty-value properties

How to use

Parse «JSON with Empty Values» and list its keys. Compare nullValue, emptyString, emptyArray, emptyObject, zeroNumber, zeroDecimal and falseBoolean without using a truthiness filter.

Outcome

There are seven properties. Null, empty text, an empty array, an empty object, two numeric zeros and false remain distinct kinds of value; 0 and 0.0 have the same numeric value. Filtering on truthiness can silently remove valid zeros and false.

3. Reconcile a downloaded dataset

How to use

Download simple.json from «Sample JSON File». After parsing, count items, compare metadata.count, inspect author.email and read items[2].price using a zero-based index.

Outcome

items has three entries and metadata.count is 3. author.email is null and the third price is numeric 0. Those values are present, so replacing either with a missing-key default changes the dataset.

FAQ

Can I add comments or trailing commas?

They are outside standard JSON. Keep the supplied syntax for a strict-parser test; use a parser explicitly supporting another format if your configuration needs comments.

Does parsing GeoJSON prove the map is correct?

No. «GeoJSON Example» adds geographical meaning to ordinary JSON. Coordinates and geometry rules need separate checks; a JSON parser only establishes the data structure.

Hub

Infer JSON Schema from Samples and Spreadsheets

Derive a reviewable JSON Schema draft from representative JSON samples or XLSX rows, then inspect types, requiredness, nulls, and outliers before treating it as a contract.

Hub

Geospatial Coordinate Conversion and Map Data Workflow

Normalize coordinate formats, verify locations, calculate distance and bearing, then convert GeoJSON, KML, OSM, and GPX data for downstream mapping work.

Hub

JSON Field Extraction, Transformation, and Provenance

Extract selected JSON fields by path, reshape the payload with JSONata, and record field-level provenance without claiming business-semantic validation.

Hub

JSON Normalization and Interchange Workflow

Turn a structured source into a checked JSON representation, then export the exact table, configuration, document, API, XML, CSON, EDN, BSON, or UBJSON form required downstream.

Home
Tools3215
Samples593
Visualizations472
Viewers103
Hubs239
Tags333
Images, Audio & Video657

Image, audio, and video processing, conversion, and optimization tools

Math, Date & Finance647

Calculators, numerics, date logic, statistics, and finance tools

Design & Color298

Color, layout, graphics, visual styling, and design helper tools

Text & Writing209

Writing, cleanup, formatting, extraction, and text analysis tools

Developer & Web194

Developer utilities, networking, web debugging, and automation helpers

Conversion & Encoding175

Format, file, archive, unit, and encoding conversion tools

Lead Generation Quiz Launch and Contact Handoff
Memorial Drafts: Family Review and Print Handoff
Private Habit Records: Backup, Restore and Sharing Review
Article to X and LinkedIn Drafts: Fact Review and Handoff
Markdown Interactive Deck Review and Offline Handoff

© 2026 Elysia Tools. All rights reserved.

DocsPricingAboutTerms of ServicePrivacy PolicyCookiesContact

Validation

JSON Schema Validator

Validate JSON data against a JSON Schema to verify structure and data types

Data Processing

JSON Key Extractor

Extract all keys from JSON objects with multiple output formats. Perfect for analyzing JSON structure, documentation generation, and understanding complex nested objects.

Converter

Pretty JSON Diff

Compare two JSON objects and display their differences in a readable format

Format Conversion

Text to JSON Converter

Convert various text formats to JSON with customizable parsing options

Format Conversion

CSV to JSON Converter

Convert CSV data to JSON format with customizable parsing options

Format Conversion

Excel to JSON Converter

Convert Excel file to JSON format, extracting data from the first worksheet

Format Conversion

JSON to CSV Converter

Convert JSON data to CSV format with customizable formatting options

Format Conversion

JSON to XML Converter

Convert JSON data to XML format with customizable formatting options

Java

Android Serialization Java Samples

Android Java serialization examples including JSON serialization, deserialization, and XML parsing

Data Formats

Apache Arrow Samples

Apache Arrow in-memory columnar format examples for high-performance data processing and analytics

Data Formats

Chat Transcript JSON Samples

JSON examples for multi-role chat transcripts

Data Formats

Parquet Samples

Apache Parquet columnar storage format examples with schemas, compression, and data processing

Data Formats

Rich Media JSON Samples

JSON examples for popular rich text editors (TipTap, Quill, Slate)

Document

PDF Samples

Generated PDF samples from tools dated 2026-02-01 to 2026-02-10