Skip to content

Commit

Permalink
update the doc of shrink
Browse files Browse the repository at this point in the history
- remove what JSON::XS actually shrink
- mention what it does now might change in the future
  • Loading branch information
charsbar committed Jan 5, 2017
1 parent 59b5e10 commit f471ecf
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/JSON/PP.pm
Expand Up @@ -2154,15 +2154,13 @@ into the corresponding C<< $WIDGET{<id>} >> object:
$enabled = $json->get_shrink
In JSON::XS, this flag resizes strings generated by either
C<encode> or C<decode> to their minimum size possible.
It will also try to downgrade any strings to octet-form if possible.
If C<$enable> is true (or missing), the string returned by C<encode> will
be shrunk (i.e. downgraded if possible).
In JSON::PP, it is noop about resizing strings but tries
C<utf8::downgrade> to the returned string by C<encode>.
See L<utf8>.
The actual definition of what shrink does might change in future versions,
but it will always try to save space at the expense of time.
See L<JSON::XS/OBJECT-ORIENTED INTERFACE>.
If C<$enable> is false, then JSON::PP does nothing.
=head2 max_depth
Expand Down

0 comments on commit f471ecf

Please sign in to comment.