|
NAMEVenus::Json - Json Class ABSTRACTJson Class for Perl 5 SYNOPSIS package main;
use Venus::Json;
my $json = Venus::Json->new(
value => { name => ['Ready', 'Robot'], version => 0.12, stable => !!1, }
);
# $json->encode;
DESCRIPTIONThis package provides methods for reading and writing JSON <https://json.org> data. Note: This package requires that a suitable JSON library is installed, currently either "JSON::XS" "3.0+", "JSON::PP" "2.27105+", or "Cpanel::JSON::XS" "4.09+". You can use the "VENUS_JSON_PACKAGE" environment variable to include or prioritize your preferred JSON library. ATTRIBUTESThis package has the following attributes: decoderdecoder(CodeRef) This attribute is read-write, accepts "(CodeRef)" values, and is optional. encoderencoder(CodeRef) This attribute is read-write, accepts "(CodeRef)" values, and is optional. INHERITSThis package inherits behaviors from: Venus::Kind::Utility INTEGRATESThis package integrates behaviors from: Venus::Role::Accessible Venus::Role::Buildable Venus::Role::Explainable Venus::Role::Valuable METHODSThis package provides the following methods: decodedecode(string $json) (any) The decode method decodes the JSON string, sets the object value, and returns the decoded value. Since 0.01
encodeencode() (string) The encode method encodes the objects value as a JSON string and returns the encoded string. Since 0.01
ERRORSThis package may raise the following errors:
AUTHORSAwncorp, "awncorp@cpan.org" LICENSECopyright (C) 2022, Awncorp, "awncorp@cpan.org". This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.
|