… | |
… | |
427 | JSON::XS->new->allow_nonref->encode ("Hello, World!") |
427 | JSON::XS->new->allow_nonref->encode ("Hello, World!") |
428 | => "Hello, World!" |
428 | => "Hello, World!" |
429 | |
429 | |
430 | =item $json = $json->allow_blessed ([$enable]) |
430 | =item $json = $json->allow_blessed ([$enable]) |
431 | |
431 | |
432 | =item $enabled = $json->get_allow_bless |
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 |