import Document Json
Suspends while importing a document JSON and applying its changes to the given document. The JSON has to be provided by the given dataProvider. Callers are responsible for choosing an appropriate kotlinx.coroutines.CoroutineDispatcher (for example kotlinx.coroutines.Dispatchers.IO).
Importing JSON to compound documents is not supported. This method will throw an exception if called with a compound document (i.e. a document having more than one document source).
Parameters
The PdfDocument to which the JSON should be imported. This must not be a compound document.
The com.pspdfkit.document.providers.DataProvider which serves the document JSON.
See also
Throws
if trying to import document JSON created with a different document, or other error occurs while importing.