Tomás Rebelo
Tomás covers the formats data passes through on its way somewhere else: Base64 and its URL-safe variant, JSON and the places where two parsers reading the same bytes disagree.
The recurring subject is the round trip. Encoding is easy to get right in one direction and wrong in the other, and most of the bugs worth writing about live in the gap: a plus sign that arrives as a space, a sixty-four-bit integer that comes back short, a duplicate key that one parser keeps and another drops.
Pages under this byline usually carry the outputs of the same input through several languages side by side, because the interesting part is rarely what one implementation does. It is where they stop agreeing.
What this byline is strict about
12 posts under this byline
Duplicate JSON Keys: .NET Gives Three Different Answers to One String
Node, Python and Go take the last value; .NET's three JSON APIs return the last value, both values, and a thrown exception.
Base64 in a Query String: Four Dropped Plus Signs Decode With No Error
An unescaped + arrives as a space and atob deletes it. At 128 bytes, 15.0% of payloads decode into the wrong bytes with no error.
JSON Schema Validation: Undeclared Properties Pass by Default
Undeclared properties pass by default; 30.0 is an integer and true is not. All measured.
Base64 in Go: Four Encodings and the Strictest Decoder
Four encodings, no conversion step, and the strictest decoder of the three languages measured.
JSON in Python: The Four Defaults That Surprise People
ensure_ascii, NaN accepted by default, key coercion, and the True/1 collapse. All measured.
Base64 Image Data URIs: The Size You Actually Pay
Measured overhead, the caching cost people forget, and why SVG usually wins for icons.
JSON Escape Characters: What Must Be Escaped, and What Must Not
Seven characters plus everything below U+0020 must be escaped; the slash and non-ASCII must not.
Base64 vs Hex: Which Encoding, and When It Matters
Hex is exactly 2 characters per byte, Base64 about 1.33. Measured comparison and how to choose.
JSON vs JSON5 vs JSONC: What Strict JSON Actually Rejects
The eight things strict JSON rejects, what each extension adds, and why they belong in files rather than on the wire.