William Denton <wtd@pobox.com>
Home ›
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.
"Legendo autem et scribendo vitam procudito." — Marcus Terentius Varro (116 - 27 B.C.)
Recent comments
-
4 days 5 hours ago
-
11 weeks 5 days ago
-
16 weeks 1 day ago
-
16 weeks 2 days ago
-
16 weeks 4 days ago


Comments
Post new comment