App-Music-ChordPro
view release on metacpan or search on metacpan
lib/ChordPro/lib/JSON/Relaxed.pm view on Meta::CPAN
C<"false">. See L</"Boolean values"> how to change this behaviour.
Likewise unquoted C<on> and C<off> when option C<prp> is specified.
=item *
Other unquoted strings will be treated as quoted strings.
=back
=head2 Perl to RRJSON
=over 4
=item *
Numbers will be output as numbers.
=item *
Strings will be output as unquoted strings if possible, quoted strings
otherwise. Non-latin characters will be output as C<\u> escapes.
When some of the quotes C<" ' `> are embedded the others will be tried
for the string, e.g. C<"a\"b"> will yield C<'a"b'>.
All quotes are equal, there is no difference in interpretation.
=item *
Boolean objects will be output as unquoted C<true> and C<false>.
=item *
Undefined values will be output as C<null>.
=back
=head2 Boolean values
By default JSON::Boolean objects will be used for unquoted C<true> and
C<false>. The C<booleans> method can be used to change this.
$parser->booleans = [ false-value, true-value ]
This sets the values to be used for C<true> and C<false>.
Default is
$parser->booleans = [ $JSON::Boolean::false, $JSON::Boolean::true ]
A non-array true value establishes the default.
Setting to a false value is the same as
$parser->booleans = [ 0, 1 ]
With option C<prp>, unquoted C<on> is the same as C<true>, and C<off>
is the same as C<false>.
=head1 ERROR HANDLING
If the document cannot be parsed, JSON::Relaxed will throw an
exception.
In legacy mode, JSON::Relaxed returns an undefined
value and sets error indicators in $JSON::Relaxed::err_id and
$JSON::Relaxed::err_msg.
If parser property C<croak_on_error> is set to a false
value, it will behave as if in legacy mode.
For a full list of error codes, see L<JSON::Relaxed::ErrorCodes>.
=head1 AUTHOR
Johan Vromans F<jv@cpan.org>
Based on original code from Miko O'Sullivan F<miko@idocs.com>.
=head1 SUPPORT
Development of this module takes place on GitHub:
L<https://github.com/sciurius/perl-JSON-Relaxed>.
You can find documentation for this module with the perldoc command.
perldoc JSON::Relaxed
Please report any bugs or feature requests using the issue tracker on
GitHub.
=head1 LICENSE
Copyright (c) 2024 by Johan Vromans. All rights reserved. This
program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself. This software comes with B<NO
WARRANTY> of any kind.
=cut
1;
( run in 0.559 second using v1.01-cache-2.11-cpan-0d23b851a93 )