Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Objects · JSON

Direct answer

JSON objects are unordered sets of key-value pairs in curly braces, with string keys, such as {"name": "web01", "port": 443}. Access fields with jq '.name' or $obj.name.

When to use this

Use this when working with JSON objects.

First 30 seconds

1. Objects are key/value maps with string keys.

2. Keys should be unique.

3. Order not guaranteed.

4. Access with .key in jq.

5. Validate required keys.

Operational verification

{ key: value } → lookup by key

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 working with JSON objects.
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.

1 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 Common mistakes Narrow the fault
  • Relying on key order.
  • Duplicate keys (behaviour undefined).
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
  • Objects are key-value pairs with string keys.
  • Key order is not guaranteed.
  • Accessing a missing key may return null silently.
Key checks
  • jq 'keys' file.json — object keys
  • jq 'has("name")' file.json — key exists
  • Duplicate keys check — ambiguity
ReferenceWhy it matters1 section · depth on demand

What it is

A JSON object is an unordered set of key/value pairs in {}; keys are strings.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

A JSON object is an unordered collection of key/value pairs inside braces. Keys are strings; values can be any JSON type, including other objects, which is how hierarchical data such as a device with interfaces and addresses is represented.

{"name": "Te1/1/1", "mtu": 9216, "ipv4": {"address": "10.255.0.1", "prefix": 31}}
jq '.ipv4.address' iface.json
jq 'keys' iface.json

Two practical points: key order is not guaranteed, so compare objects structurally (jq -S, json.loads then ==) rather than as text; and duplicate keys are technically allowed but behave differently between parsers — avoid them.

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 > Objects. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc8259 · confidence 94%
Confirmation

Confirm action

Continue?