toJSON

Deprecated

Use toString() and Text.of() for serialization.

Replace with

toString()

Convert the document to an array of lines (which can be deserialized again via Text.of).