Perl

Perl `JSON::XS` can produce un-canonical JSON

14 Mar 2018

Sometimes you want to produce a canonical version of a data structure in JSON - with keys sorted and no additional whitespace. JSON::XS promises us that we can achieve such result with a canonical option. It only notes that canonicalization doesn’t work for tied hashes. But I’ve just spent half a day debugging to learn that this is a bit more complicated.

Tags: perl sadness Read more…
⇦ Older Newer ⇨