Barcode Batch Deserializer
Defined in package com.scandit.datacapture.barcode.serialization
Warning
The deserialization API is not yet stable and will still change over the coming releases.
Note
This deserializer is not thread-safe, subsequent calls for the same settings, mode or overlay have to be called on the same thread.
- BarcodeBatchDeserializer
class BarcodeBatchDeserializer : DataCaptureModeDeserializer
Added in version 7.0.0
A deserializer to construct Barcode Batch from JSON. For most use cases it is enough to use BarcodeBatch.fromJson() which internally uses this deserializer. Using the deserializer gives the advantage of being able to listen to the deserialization events as they happen and potentially influence them. Additionally warnings can be read from the deserializer that would otherwise not be available.
- BarcodeBatchDeserializer()
BarcodeBatchDeserializer()
Added in version 7.0.0
Creates a new deserializer object.
- listener
@NonNull BarcodeBatchDeserializerListener getListener()
void
setListener(@NonNull BarcodeBatchDeserializerListener value)Added in version 7.0.0
The object informed about deserialization events.
- warnings
@NonNull List<@NonNull String> getWarnings()
Added in version 7.0.0
The warnings produced during deserialization, for example which properties were not used during deserialization.
- modeFromJson(dataCaptureContext, jsonData)
BarcodeBatch modeFromJson(DataCaptureContext dataCaptureContext, @NonNull String jsonData)
Added in version 7.0.0
Deserializes Barcode Batch from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.
- updateModeFromJson(mode, jsonData)
@NonNull BarcodeBatch updateModeFromJson(@NonNull BarcodeBatch mode, @NonNull String jsonData)
Added in version 7.0.0
Takes an existing Barcode Batch and updates it by deserializing new or changed properties from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.
- settingsFromJson(jsonData)
@NonNull BarcodeBatchSettings settingsFromJson(@NonNull String jsonData)
Added in version 7.0.0
Deserializes Barcode Batch settings from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.
- updateSettingsFromJson(settings, jsonData)
@NonNull BarcodeBatchSettings updateSettingsFromJson( @NonNull BarcodeBatchSettings settings, @NonNull String jsonData)
Added in version 7.0.0
Takes existing Barcode Batch settings and updates them by deserializing new or changed properties from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.
- basicOverlayFromJson(mode, jsonData)
@NonNull BarcodeBatchBasicOverlay basicOverlayFromJson( @NonNull BarcodeBatch mode, @NonNull String jsonData)
Added in version 7.0.0
Deserializes a Barcode Batch basic overlay from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.
- updateBasicOverlayFromJson(overlay, jsonData)
@NonNull BarcodeBatchBasicOverlay updateBasicOverlayFromJson( @NonNull BarcodeBatchBasicOverlay overlay, @NonNull String jsonData)
Added in version 7.0.0
Takes an existing Barcode Batch basic overlay and updates it by deserializing new or changed properties from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.
- advancedOverlayFromJson(mode, jsonData)
@NonNull BarcodeBatchAdvancedOverlay advancedOverlayFromJson( @NonNull BarcodeBatch mode, @NonNull String jsonData)
Added in version 7.0.0
Deserializes a Barcode Batch advanced overlay from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.
- updateAdvancedOverlayFromJson(overlay, jsonData)
@NonNull BarcodeBatchAdvancedOverlay updateAdvancedOverlayFromJson( @NonNull BarcodeBatchAdvancedOverlay overlay, @NonNull String jsonData)
Added in version 7.0.0
Takes an existing Barcode Batch advanced overlay and updates it by deserializing new or changed properties from JSON.
An exception is thrown if the provided JSON does not contain required properties or contains properties of the wrong type.