Object built-in object

objectMongoID

The mongodb database data uniquely identifies the object, which is used to store and pass the oid

inheritance relationship

%0 object object toString() toJSON() MongoID MongoID object->MongoID

member function

toString

Return the string representation of the object, generally return "[Native Object]", the object can be reimplemented according to its own characteristics

1
String MongoID.toString();

return result:

  • String, returns a string representation of the object

toJSON

Returns the JSON format representation of the object, generally returns a collection of readable properties defined by the object

1
Value MongoID.toJSON(String key = "");

Call parameters:

  • key: String, not used

return result:

  • Value, which returns a JSON-serializable value