Barcode Pick Deserializer

Defined in framework ScanditBarcodeCapture

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.

BarcodePickDeserializer
open class BarcodePickDeserializer : NSObject

Added in version 6.19.0

A deserializer to construct barcode pick settings and mode from JSON.

init
init()

Added in version 6.19.0

Creates a new deserializer object.

settings
open func settings(fromJSONString JSONString: String) throws -> BarcodePickSettings

Added in version 6.19.0

Constructs a new BarcodePickSettings object with the provided JSON serialization.

update
open func update(_ settings: BarcodePickSettings, fromJSONString JSONString: String) throws -> BarcodePickSettings

Added in version 6.19.0

Updates the settings according to a JSON serialization.

mode
open func mode(fromJSONString JSONString: String, context: DataCaptureContext, productProvider: any BarcodePickProductProvider) throws -> BarcodePick

Added in version 6.19.0

Constructs a new BarcodePick object with the provided JSON serialization.

updateMode
open func updateMode(_ mode: BarcodePick, fromJSONString JSONString: String) throws -> BarcodePick

Added in version 6.19.0

Updates the mode according to a JSON serialization.

asyncMapperProductProvider
open func asyncMapperProductProvider(fromJSONString JSONString: String, delegate: any BarcodePickAsyncMapperProductProviderDelegate) throws -> BarcodePickAsyncMapperProductProvider

Added in version 6.19.0

Constructs a new async BarcodePickAsyncMapperProductProvider with the provided JSON serialization.

delegate
open weak var delegate: BarcodePickDeserializerDelegate? { get, set }

Added in version 6.19.0

The object informed about deserialization events.

view
open func view(fromJSONString JSONString: String, context: DataCaptureContext, mode: BarcodePick) throws -> BarcodePickView

Added in version 6.19.0

Constructs a new BarcodePickView object with the provided JSON serialization.

view
open func view(fromJSONString JSONString: String, context: DataCaptureContext, topLayoutAnchor: NSLayoutYAxisAnchor?, mode: BarcodePick, viewHighlightStyleDelegate: (any BarcodePickViewHighlightStyleDelegate)?) throws -> BarcodePickView

Added in version 7.1.0

Constructs a new BarcodePickView object with the provided JSON serialization, and a BarcodePickViewHighlightStyleDelegate that will be set as delegate to the highlight style if supported.

view
open func view(fromJSONString JSONString: String, context: DataCaptureContext, topLayoutAnchor: NSLayoutYAxisAnchor?, mode: BarcodePick, customViewHighlightStyleDelegate: (any BarcodePickViewHighlightStyleCustomViewDelegate)?) throws -> BarcodePickView

Added in version 6.25.0

Constructs a new BarcodePickView object with the provided JSON serialization, and a BarcodePickViewHighlightStyleCustomViewDelegate for the BarcodePickViewHighlightStyleCustomView type.

view
open func view(fromJSONString JSONString: String, context: DataCaptureContext, topLayoutAnchor: NSLayoutYAxisAnchor?, mode: BarcodePick) throws -> BarcodePickView

Added in version 6.20.0

Constructs a new BarcodePickView object with the provided JSON serialization. An optional topLayoutAnchor can be specified. See BarcodePickViewSettings.topLayoutAnchor.

update
open func update(_ view: BarcodePickView, fromJSONString JSONString: String) throws -> BarcodePickView

Added in version 6.19.0

Updates the view according to a JSON serialization.