escentmachine / field notes
Uncategorized
-
Why JSON Rejects NaN and Infinity, and How to Handle Them
NaN, Infinity, and -Infinity have no permitted JSON number spelling. Find their locations before serialization, then choose a representation the receiver understands. Check syntax, numeric range, and preserved…
-
Can a JSON Document Be Just a Number, Boolean, or Null?
A complete JSON document can contain a single number, boolean, null, or double-quoted string. Learn what parsing produces, how quotes change the resulting type, and why valid JSON…
-
Mitigating JSON Numeric Precision Loss with String Representations
JSON numbers follow double-precision rules, so very large integers and certain decimals become rounded. The common fix is to encode sensitive numbers as strings. This article explains the…
-
Why NDJSON Logs Fail in a JSON Formatter
Valid NDJSON records can fail when a formatter expects one JSON document. Learn to check record boundaries, isolate malformed lines, choose an empty-line policy, and construct an array…
-
Why Formatting JSON Can Break Webhook Signature Verification
JSON formatting can preserve a payload’s meaning while changing its signed representation. Preserve the original request body, follow the provider’s complete verification procedure, and format a separate copy…
-
How to Inspect Nested Arrays and Objects in a JSON API Response
Follow a JSON response from its root to a specific value. These examples explain object keys, array indexes, repeated values, missing fields, empty containers, and how to compare…
-
How to Encode a Redirect URL Inside a Query Parameter
Keep a complete destination inside one redirect parameter, then check the recovered string against the original. This guide provides an unexecuted JavaScript diagnostic and explains what to verify…
-
How to Recognize and Fix Double URL Encoding
An unexpected %252F is a clue to investigate. Compare the intended value with its serialized and parsed representations, locate the first unwanted transformation, and repair the producer while…
-
Why Windows File Paths Need Doubled Backslashes in JSON
A doubled backslash in JSON represents one backslash in the parsed string. Compare clearly labeled path values and JSON representations, recognize escapes that change your data, and use…
-
How to Distinguish Null, Empty Strings, and Missing JSON Properties
An omitted property supplies no name-value pair. Null and an empty string are supplied values. Record presence and value separately, locate nested problems precisely, and use the field…