
Faster JSON in Python With orjson and What Changes
orjson wrote a 35 MB document 6 times faster than json and parsed it 1.7 times faster. What it returns, what it rejects and what to check before migrating.
Everything you need to level up your coding skills.

orjson wrote a 35 MB document 6 times faster than json and parsed it 1.7 times faster. What it returns, what it rejects and what to check before migrating.

pandas read_json turned the zip "01234" into 1234. How orient, lines, dtype and the pyarrow backend change the result, and what changed in pandas 3.

Pretty print JSON with json.dumps(indent), python -m json.tool and pprint, keep non-ASCII readable, sort keys and collapse short arrays.

Swift has no CSV parser in Foundation, and its String treats CRLF as one Character, so splitting on a newline fails. Parse bytes or use SwiftCSV.

Read a CSV in Kotlin with kotlin-csv and build a small import job that validates rows, rejects bad ones with row numbers and never hides a failure.

A bash read loop on a CSV breaks on quoted commas, backslashes, a missing last newline and empty tab fields. Let a CSV parser emit safe records first.

Parse CSV in Ruby 3.4 with the csv gem: the Gemfile LoadError, a numeric converter that read 02134 as 1116, nil versus empty strings, and timings.

Read CSV in PHP 8.5 with fgetcsv and SplFileObject: the $escape deprecation, a backslash that swallows the file, str_getcsv traps and the BOM.

Read CSV in C# with CsvHelper 33: case-sensitive headers, typed ZIP codes, silent ragged rows, and a de-DE culture that made a total 91 times too big.

Parse CSV in Rust with the csv crate: StringRecord, ByteRecord and serde, UnequalLengths errors, typed ZIP codes and an unclosed quote it accepts.

Compare read_csv, fread and base read.csv on the same files: type guessing and ZIP codes, ragged rows, bad quotes, the BOM, and speed on 2,000,000 rows.

Read CSV in Java with OpenCSV and Commons CSV: a backslash escape that breaks paths, ints that turn blanks into 0, and a writer that quotes everything.
We send one email when a new article is published. No spam.