JSON::PC

JSON::PC is a fast JSON parser and converter.
Download

JSON::PC Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Makamaka Hannyaharamitu
  • Publisher web site:
  • http://search.cpan.org/~makamaka/

JSON::PC Tags


JSON::PC Description

JSON::PC is a fast JSON parser and converter. JSON::PC is a fast JSON parser and converter.SYNOPSIS use JSON::PC; my $json = new JSON::PC; my $obj = $json->parse(q/{foo => , bar => "perl"}/); print $json->convert($obj); # or $obj = JSON::PC::parse(q/{foo => , bar => "perl"}/); print JSON::PC::convert($obj);METHODSExcept new method, all methods are object method.new() new(%option)This is a class method and returns new JSON::PC object.parse($str) parse($str, $options_ref)takes JSON foramt string and returns perl data structure. jsonToObj is an alias.convert($obj) convert($obj, $options_ref)takes perl data structure and returns JSON foramt string. objToJson is an alias.autoconv($int)This is an accessor to autoconv. See "AUTOCONVERT" for more info.skipinvalid($int)convert() does die() when it encounters any invalid data (for instance, coderefs). If skipinvalid is set with true(integer), the function convets these invalid data into JSON format's null.execcoderef($int)convert() does die() when it encounters any code reference. However, if execcoderef is set with true(integer), executes the coderef and uses returned value.pretty($int)This is an accessor to pretty. When prrety is true(integer), objToJson() returns prrety-printed string. See "PRETTY PRINTING" for more info.indent($int)This is an accessor to indent. See "PRETTY PRINTING" for more info.delimiter($int)This is an accessor to delimiter. See "PRETTY PRINTING" for more info.unmapping($int)This is an accessor to unmapping. See "UNMAPPING OPTION" for more info.keysort($int) keysort($code_ref)This is an accessor to keysort. See "HASH KEY SORT ORDER" for more info.convblessed($int)This is an accessor to convblessed. See "BLESSED OBJECT" for more info.selfconvert($int)This is an accessor to selfconvert. See "BLESSED OBJECT" for more info.singlequote($int)This is an accessor to singlequote. See "CONVERT WITH SINGLE QUOTES" for more info.barekey($int)You can set a true(integer) to parse bare keys of objects.quotapos($int)You can set a true(integer) to parse any keys and values quoted by single quotations.utf8($int)This is an accessor to utf8. You can set a true(integer) to set UTF8 flag into strings contain utf8. Requirements: · Perl


JSON::PC Related Software