class BSON::ObjectId

def as_json(*_)

Returns:
  • (String) - The object id as a string.

Other tags:
    Example: Get the object id as a JSON-serializable object. -
def as_json(*_)
  to_s
end