Skip to content

JavaScript::HashRef::Decode - a JS HashRef decoder for JS to Perl data structures conversion

Notifications You must be signed in to change notification settings

theregister/JavaScript-HashRef-Decode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript::HashRef::Decode

Build Status

This module allows you to decode a JavaScript "simple object" (a hashref) into a Perl hashref structure.

It supports strings, numbers, hashrefs, and arrayrefs.

Hashrefs values can contain either of the above, and so do arrayrefs values.

Examples

use JavaScript::HashRef::Decode qw<decode_js>;
use Data::Dumper::Concise;
my $js   = q!{ foo: "bar", baz: { quux: 123 } }!;
my $href = decode_js($js);
print Dumper $href;
{
    baz => {
        quux => 123
    },
    foo => "bar"
}

Copyright

This software is copyright (c) 2013 by Situation Publishing.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

About

JavaScript::HashRef::Decode - a JS HashRef decoder for JS to Perl data structures conversion

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages