JSON::Decode::Regexp - JSON parser as a single Perl Regex
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.
Please visit the project's homepage at https://metacpan.org/release/JSON-Decode-Regexp.
Source repository is at https://github.com/sharyanto/perl-JSON-Decode-Regexp.
Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/Public/Dist/Display.html?Name=JSON-Decode-Regexp
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
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.