Steven Haryanto > JSON-Decode-Regexp-0.03 > JSON::Decode::Regexp

Download:
JSON-Decode-Regexp-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

JSON::Decode::Regexp - JSON parser as a single Perl Regex

SYNOPSIS ^

 use JSON::Decode::Regexp qw(from_json);
 my $data = from_json(q([1, true, "a", {"b":null}]));

DESCRIPTION ^

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".

FUNCTIONS ^

from_json($str) => DATA

Decode JSON in $str. Dies on error.

FAQ ^

How does this module compare to other JSON modules on CPAN?

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.

SEE ALSO ^

JSON, JSON::PP, JSON::XS, JSON::Tiny.

HOMEPAGE ^

Please visit the project's homepage at https://metacpan.org/release/JSON-Decode-Regexp.

SOURCE ^

Source repository is at https://github.com/sharyanto/perl-JSON-Decode-Regexp.

BUGS ^

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.

AUTHOR ^

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: