Automation · Data Formats › JSON
Data Types
Cheat sheet · https://pcornel.dk/topic.php?topic=5821
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.
Remember
- JSON has no date type; dates are strings.
- Very large numbers may lose precision.
- null and missing keys are different.
First checks
jq 'type' file.json— top-level typejq '.port | type' file.json— field type- Numbers vs strings ("80" vs 80) — type consistency
Verify in this order
value → JSON type → consumer expects type
Where it usually breaks
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5821