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.
Main menu
"Legendo autem et scribendo vitam procudito." — Marcus Terentius Varro (116 - 27 B.C.)
Links
identi.ca
Recent comments
- Quite right. I also consider
2 weeks 4 days ago - Don't forget Doom, Octopus,
2 weeks 4 days ago - Harnum finished reading the
3 weeks 1 day ago - Very excellent. Finishing up
7 weeks 2 days ago - Shouldn't this require an
7 weeks 2 days ago - This is very very
7 weeks 5 days ago - Back when I wrote using troff
7 weeks 6 days ago - These prices seem very low
11 weeks 2 days ago - Summon, abt 40.000$/yr in
12 weeks 18 hours ago - There can be legitimate
12 weeks 2 days ago


Comments
Post new comment