… | |
… | |
432 | =item $enabled = $json->get_allow_blessed |
432 | =item $enabled = $json->get_allow_blessed |
433 | |
433 | |
434 | If C<$enable> is true (or missing), then the C<encode> method will not |
434 | If C<$enable> is true (or missing), then the C<encode> method will not |
435 | barf when it encounters a blessed reference. Instead, the value of the |
435 | barf when it encounters a blessed reference. Instead, the value of the |
436 | B<convert_blessed> option will decide whether C<null> (C<convert_blessed> |
436 | B<convert_blessed> option will decide whether C<null> (C<convert_blessed> |
437 | disabled or no C<to_json> method found) or a representation of the |
437 | disabled or no C<TO_JSON> method found) or a representation of the |
438 | object (C<convert_blessed> enabled and C<to_json> method found) is being |
438 | object (C<convert_blessed> enabled and C<TO_JSON> method found) is being |
439 | encoded. Has no effect on C<decode>. |
439 | encoded. Has no effect on C<decode>. |
440 | |
440 | |
441 | If C<$enable> is false (the default), then C<encode> will throw an |
441 | If C<$enable> is false (the default), then C<encode> will throw an |
442 | exception when it encounters a blessed object. |
442 | exception when it encounters a blessed object. |
443 | |
443 | |