Perl – very lightweight JSON object ‘parser’ – if you don’t want/need the full use JSON

By no means meant as something that will work on any JSON, but it’s enough to parse most objects returned by compliant API’s:

sub decode_json {
local $_ = shift;
@r = $_=~/”(.*?)”:”*(.*?)”*[,}]/isgm;
%a = ();

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>