JSON::Decode::Regexp - JSON parser as a single Perl Regex
version 0.02
use JSON::Decode::Regexp qw(from_json); my $data = from_json(q([1, true, "a", {"b":null}]));
This module is a packaging of Randal L. Schwartz' code (with minor modification) originally posted at:
http://perlmonks.org/?node_id=995856
The code is licensed "just like Perl".
Decode JSON in $str. Dies on error.
$str
This module is rather slower than JSON::PP, does not support Unicode, and does not pinpoint exact location on parse error. But it is a cool hack and demonstrates the power of Perl regular expressions. It does not require any non-core module. It requires Perl 5.10 at the minimum because it utilizes regex features like named capture and recursive pattern.
JSON, JSON::PP, JSON::XS, JSON::Tiny.
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2013 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install JSON::Decode::Regexp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSON::Decode::Regexp
CPAN shell
perl -MCPAN -e shell install JSON::Decode::Regexp
For more information on module installation, please visit the detailed CPAN module installation guide.