
Reading JSON in Ruby With the json Gem and Its Options
JSON.parse in Ruby 3.4 with json 2.9.1: symbolized keys, big numbers, NaN, comments that parse by default, max_nesting 100, create_additions and errors.
Tag
590 posts

JSON.parse in Ruby 3.4 with json 2.9.1: symbolized keys, big numbers, NaN, comments that parse by default, max_nesting 100, create_additions and errors.

json_decode in PHP 8.5 returns null on bad input unless you throw. Arrays or objects, big integers, depth 512, flags and the list versus object trap.

Read JSON in Rust with serde_json 1.0.154: derived structs, Option and null, deny_unknown_fields, duplicates, integer ranges, the 128 level limit and enums.

What System.Text.Json does by default in .NET 9: exact-case names, JsonSerializerDefaults.Web, enum surprises, the 64 level depth limit and duplicate keys.

Read JSON in Java with Jackson 2.20: records, JsonNode trees, unknown fields, duplicate keys, the nesting and number limits, and the date trap on writing.

Go ignores unknown JSON members by default. Reject them with DisallowUnknownFields, keep them with a raw map, and see where each option stops working.

Load a CSV into SQLite with one sqlite-utils command, set a primary key, control type detection, add full-text search, and see what 2 million rows cost.

Open a CSV in VisiData to scroll, sort, filter and profile it from the keyboard, build frequency tables, and save results, plus its batch mode for scripts.

Miller (mlr) treats CSV rows as named records and chains verbs with then. Real runs for sorting, grouping, new columns, JSON conversion and splitting files.

xsv and qsv share a command set, and qsv adds an index, sniffing, validation and more. See the overlap, the real timings with an index, and the type trap.

Some CSV files carry lines starting with a hash that are notes, not data. Skip them safely, because a comment option can also cut values like Suite #4.

A CSV that repeats its header after every page or section breaks type conversion. Find the repeated lines, drop them safely and check nothing real went too.