GoLang MongoDB\BSON\ObjectId::jsonSerialize

request it (42)
GoLang replacement for PHP's MongoDB\BSON\ObjectId::jsonSerialize [edit | history]



Do you know a GoLang replacement for PHP's MongoDB\BSON\ObjectId::jsonSerialize? Write it!

PHP MongoDB\BSON\ObjectId::jsonSerialize

PHP original manual for MongoDB\BSON\ObjectId::jsonSerialize [ show | php.net ]

MongoDB\BSON\ObjectId::jsonSerialize

(mongodb >=1.2.0)

MongoDB\BSON\ObjectId::jsonSerializeReturns a representation that can be converted to JSON

Description

final public mixed MongoDB\BSON\ObjectId::jsonSerialize ( void )

Parameters

This function has no parameters.

Return Values

Returns data which can be serialized by json_encode() to produce an extended JSON representation of the MongoDB\BSON\ObjectId.

The output is consistent with the MongoDB\BSON\toJSON() function, which represents the driver specifc legacy extended JSON format, which does not necessarily match the relaxed or » canonical extended JSON representation.

Errors/Exceptions

See Also