PSPDFDocumentJSONImportBehavior

enum PSPDFDocumentJSONImportBehavior {}

List of supported import behaviors for Instant Document JSON.

  • Legacy behavior.

    Invalid entries in the JSON are ignored. An error message for each such entry will be logged to the console though.

    Declaration

    Objective-C

    PSPDFDocumentJSONImportBehaviorLogInvalidEntriesAndContinue

    Swift

    case logInvalidEntriesAndContinue = 0
  • Strict behavior.

    The first invalid entry causes an immediate import failure. No further entries are processed, and the document is not modified.

    Declaration

    Objective-C

    PSPDFDocumentJSONImportBehaviorFailOnFirstInvalidEntry

    Swift

    case failOnFirstInvalidEntry = 1
  • Strict but greedy behavior.

    The entire JSON is processed, even when partially invalid. For any invalid entry, an error will be recorded, and the import process fails at the very end — before modifying the document — with an error that includes a listing of the defects in the processed JSON.

    Declaration

    Objective-C

    PSPDFDocumentJSONImportBehaviorGatherAllErrorsBeforeFailing

    Swift

    case gatherAllErrorsBeforeFailing = 2