William Denton <wtd@pobox.com>
yaml2json
Submitted by wtd on 16 October 2009 - 11:56pm
A Google search for yaml2json got fewer results than I'd expected, but had an answer, and convert yaml to json led me to another Perl one-liner I note here for reference:
perl -MYAML=Load -MJSON::Any -E 'say JSON::Any->new->Dump(Load(do { local $/; <> }))'
I needed the JSON::Any Perl module, which is libjson-any-perl in Synaptic on Ubuntu. Is it just me or is it hard to find things in Synaptic? How would I search for "json AND perl"? Anyway, searching for "json" and scrolling turned it up.
Reply
"Legendo autem et scribendo vitam procudito." — Marcus Terentius Varro (116 - 27 B.C.)

Recent comments
2 days 10 hours ago
6 weeks 3 days ago
10 weeks 6 days ago
12 weeks 4 days ago
15 weeks 2 days ago
15 weeks 6 days ago
19 weeks 3 days ago
36 weeks 4 days ago
43 weeks 4 days ago
45 weeks 6 days ago