MarpaX::ESLIF::JSON::Encoder - ESLIF's JSON encoder interface
version 6.0.12
This is JSON's strict and relax encoder writen directly in MarpaX::ESLIF library.
There are two JSON modes:
Encoder is strict, as per ECMA-404 The JSON Data Interchange Standard.
Encoder is relax, i.e.:
+Infinity and -Infinity can appear in the output.
+Infinity
-Infinity
NaN can appear in the output.
NaN
my $eslifJSONEncoder = MarpaX::ESLIF::JSON::Encoder->new($eslif);
Returns a JSON grammar instance, noted $eslifJSONEncoder later. Parameters are:
$eslifJSONEncoder
$eslif
MarpaX::ESLIF object instance. Required.
$strict
A true value means strict JSON, else relax JSON. Default is a true value.
my $string = $eslifJSONEncoder->encode($value);
Returns a string containing encoded JSON data.
Formally, the JSON implementation is only a grammar coded directly in the ESLIF library, therefore this module inherits from MarpaX::ESLIF::Grammar.
Jean-Damien Durand <jeandamiendurand@free.fr>
This software is copyright (c) 2017 by Jean-Damien Durand.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MarpaX::ESLIF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MarpaX::ESLIF
CPAN shell
perl -MCPAN -e shell install MarpaX::ESLIF
For more information on module installation, please visit the detailed CPAN module installation guide.