Split a body into its consecutive top-level JSON documents, preserving each
document's exact text. Throws on a malformed tail so the caller reports a
ParseError rather than silently dropping data. onDocument, when given,
sees each document as it is split, so a caller keeps the documents before a
malformed tail even though the call throws.
Split a body into its consecutive top-level JSON documents, preserving each document's exact text. Throws on a malformed tail so the caller reports a
ParseErrorrather than silently dropping data.onDocument, when given, sees each document as it is split, so a caller keeps the documents before a malformed tail even though the call throws.