Group
Extension

Matches 1

JSON-Decode-Regexp ( P/PE/PERLANCAR/JSON-Decode-Regexp-0.102.tar.gz, PERLANCAR, 2021; MetaCPAN )
JSON-Decode-Regexp/lib/JSON/Decode/Regexp.pm ( view source; MetaCPAN )
package JSON::Decode::Regexp;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2021-08-01'; # DATE
our $DIST = 'JSON-Decode-Regexp'; # DIST
our $VERSION = '0.102'; # VERSION

use 5.014004;
s;

#use Data::Dumper;

require Exporter;
our @ISA       = qw(Exporter);
our @EXPORT_OK = qw(from_json);

sub _fail { die __PACKAGE__.": $_[0] at offset ".pos()."\n" }

my %escape_codes = (
    "\\" =
  $escape_codes{$4} ? $escape_codes{$4} :
                          $1]eg;
    $str;
}

our $FROM_JSON = qr{

(?:
    (?&VALUE) (?{ $_ = $^R->[1] })
|
    \z (?{ _fail "Unexpected end of input" })
|
 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.