I have a mongoDB with :
my $data = $newspapers->find_one({_id => 2000});
last_mdb_update is a datetime in $data and is a ISODate in mongoDB
$result = to_json( $data, { ascii => 1, utf8 => 1, pretty => 1 } );
I got an error: encountered object '2013-11-06T06:45:16', but neither allow_blessed nor convert_blessed settings are enabled
Note: I can do, to fix and serialize, but is an ugly workaround and just works for that field:
$data->{last_mdb_update} = ''.$data->{last_mdb_update};
$result = to_json( $data, {ascii => 1, utf8 => 1, pretty => 1, convert_blessed => 1 } ); says (...) nor TO_JSON method available
what is TO_JSON method for ISODate ?