Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Perl module would you recommend for JSON manipulation?

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?

like image 465
smonff Avatar asked Jan 29 '13 20:01

smonff


1 Answers

I would recommend JSON::MaybeXS - Uses Cpanel::JSON::XS with a fallback to JSON::XS and JSON::PP.

Cpanel::JSON::XS has improvements over JSON::XS, so JSON::MaybeXS makes your code nice and portable.

Usually I would look to Task::Kensho if I'm not sure of which module to use for a specific situation, though they don't have JSON at the moment, I've reported it to them!

like image 70
Ranguard Avatar answered Nov 15 '22 15:11

Ranguard