… | |
… | |
344 | way. C<TO_JSON> must take care of not causing an endless recursion cycle |
344 | way. C<TO_JSON> must take care of not causing an endless recursion cycle |
345 | (== crash) in this case. The name of C<TO_JSON> was chosen because other |
345 | (== crash) in this case. The name of C<TO_JSON> was chosen because other |
346 | methods called by the Perl core (== not the user of the object) are |
346 | methods called by the Perl core (== not the user of the object) are |
347 | usually in upper case letters and to avoid collisions with the C<to_json> |
347 | usually in upper case letters and to avoid collisions with the C<to_json> |
348 | function. |
348 | function. |
|
|
349 | |
|
|
350 | This setting does not yet influence C<decode> in any way, but in the |
|
|
351 | future, global hooks might get installed that influence C<decode> and are |
|
|
352 | enabled by this setting. |
349 | |
353 | |
350 | If C<$enable> is false, then the C<allow_blessed> setting will decide what |
354 | If C<$enable> is false, then the C<allow_blessed> setting will decide what |
351 | to do when a blessed object is found. |
355 | to do when a blessed object is found. |
352 | |
356 | |
353 | =item $json = $json->shrink ([$enable]) |
357 | =item $json = $json->shrink ([$enable]) |