Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Data Types · JSON

Direct answer

JSON data types are string, number, boolean, null, object and array. There is no date or integer type, so dates are strings and very large numbers may lose precision in some parsers.

When to use this

Use this when JSON types like dates, big numbers or null cause errors in automation.

First 30 seconds

1. JSON types: string, number, boolean, null, object, array.

2. Large integers may lose precision in some languages.

3. Don't quote numbers/booleans unintentionally.

4. No date type — use ISO 8601 strings.

5. Validate types with schema.

Operational verification

value → JSON type → consumer expects type

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
JSON parsing and validation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformJSON parsing and validation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when JSON types like dates, big numbers or null cause errors in automation.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

The negative fixture should deliberately exercise risks such as encoding/BOM issues, delimiter/quoting ambiguity, duplicate keys, namespace drift, scalar coercion, invalid schema assumptions and parser success without consumer-valid semantics, choosing the cases most relevant to built-in scalar types, typedef, union, enumeration/bits, leafref/identityref and range/length/pattern restrictions.

Step 2 Common mistakes Narrow the fault
  • "true" (string) instead of true (boolean).
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • JSON has no date type; dates are strings.
  • Very large numbers may lose precision.
  • null and missing keys are different.
Key checks
  • jq 'type' file.json — top-level type
  • jq '.port | type' file.json — field type
  • Numbers vs strings ("80" vs 80) — type consistency
ReferenceWhy it matters1 section · depth on demand

What it is

JSON types: string, number, boolean, null, object, array. There is no date type — dates are strings, usually ISO 8601.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

JSON has six data types: string, number, boolean, null, object and array. There is no date, integer/float distinction or binary type, so those are conventions on top of strings and numbers.

NeedConvention
Date/timeISO 8601 string "2026-11-05T10:15:00Z"
Large integers (IDs > 2^53)String, to avoid precision loss in JavaScript
BinaryBase64 string
Leading zeros ("007")String
Unknown vs emptynull vs "" or [] — choose deliberately

Type mismatches are a frequent API error: sending "20" where the schema expects 20 returns 400. Check the API schema, and convert types explicitly in scripts.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docJSON parsing and validation current

Authoritative/upstream documentation reviewed for bounded claims in JSON > Data Types. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc8259 · confidence 94%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For built-in scalar types, typedef, union, enumeration/bits, leafref/identityref and range/length/pattern restrictions, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?