The to_json method returns a string containing the document in JSON format.
to_json
to_json()
(String). Returns the document as a string.