Which Perl module would you recommend for JSON manipulation?

smonff picture smonff · Jan 29, 2013 · Viewed 9.9k times · Source

As usual, I'm happy to deal with CPAN because it got all we need. As usual, I'm lost because there is plenty of stuff.

I can find the core JSON one by myself, and feel enthusiastic by a JSON::Tiny other.

My needs are very simple (parsing stuffs from the Open Library API) and, maybe someday, expose our own data.

Is there any other modules that you like for this task?

Answer

Miguel Prz picture Miguel Prz · Jan 29, 2013

JSON module works like a champ, but if you need a faster parser, use this one: JSON::XS, which requires a native compilation.

Note that JSON version 2.0 and above is merely a front end for JSON::XS (if installed) or JSON::PP (fallback).