|
MongoDB\BSON\PackedArray::toCanonicalExtendedJSONReturns the Canonical Extended JSON representation of the BSON array Description
final public string MongoDB\BSON\PackedArray::toCanonicalExtendedJSON()
Converts the BSON array to its » Canonical Extended JSON representation. The canonical format prefers type fidelity at the expense of concise output and is most suited for producing output that can be converted back to BSON without any loss of type information (e.g. numeric types will remain differentiated). ParametersThis function has no parameters. Return ValuesReturns a string containing the » Canonical Extended JSON representation of the BSON array. ExamplesExample #1 MongoDB\BSON\PackedArray::toCanonicalExtendedJSON example
The above example will output: [ "foo", { "$numberInt" : "123" }, { "$numberLong" : "4294967295" }, { "$oid" : "56315a7c6118fd1b920270b1" } ] See Also
|