escentmachine / field notes
Uncategorized
-
JSON Number Precision and Safe Integers: A Practical Guide
JSON number tokens are text and can be arbitrarily precise, but JavaScript Number values use IEEE 754 binary64 and cannot exactly represent every integer beyond 2^53 – 1.…
-
Is Your API Response an Object or a JSON-Encoded String?
A successful JSON parse can return a string, an array, null, or another primitive. Compare response text with the value produced by one parse, validate the expected shape,…
-
Debugging JSON Integers Beyond 2^53
A field note on JSON integers beyond 2^53: the text can be valid while the parsed binary64 value is rounded. Covers parse behavior, reserialization, contract design, BigInt serialization,…
-
Why Query Parameter Decoding Turns Plus Signs Into Spaces
A raw plus becomes a space under form-style query parsing, while component decoding preserves it. Follow JavaScript examples to protect literal plus signs, build queries from raw values,…
-
What JSON Parsers Actually Do With Duplicate Keys
Duplicate JSON object names are syntactically easy and semantically ambiguous. RFC 8259 recommends uniqueness with SHOULD, not MUST, so receivers may keep the last value, keep the first…