Label Capture Deserializer

Defined in framework ScanditLabelCapture

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.

SDCLabelCaptureDeserializer
@interface SDCLabelCaptureDeserializer : NSObject <SDCDataCaptureModeDeserializer>

Added in version 6.4.0

A deserializer to construct label capture from JSON. For most use cases it is enough to use SDCLabelCapture.labelCaptureFromJSONString:context:error: 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.

+ labelCaptureDeserializer
+ (instancetype)labelCaptureDeserializer

Added in version 6.4.0

Creates a new deserializer object.

delegate
@property (nonatomic, weak, nullable) id<SDCLabelCaptureDeserializerDelegate> delegate

Added in version 6.4.0

The object informed about deserialization events.

warnings
@property (nonatomic, readonly) NSArray<NSString *> *warnings

Added in version 6.4.0

The warnings produced during deserialization, for example which properties were not used during deserialization.

- modeFromJSONString:withContext:error:
- (nullable SDCLabelCapture *)modeFromJSONString:(NSString *)JSONString
                                     withContext:(SDCDataCaptureContext *)context
                                           error:(NSError **)error

Added in version 6.4.0

Deserializes label capture from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.

- updateMode:fromJSONString:error:
- (nullable SDCLabelCapture *)updateMode:(SDCLabelCapture *)labelCapture
                          fromJSONString:(NSString *)JSONString
                                   error:(NSError **)error

Added in version 6.4.0

Takes an existing label capture and updates it by deserializing new or changed properties from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.

- settingsFromJSONString:error:
- (nullable SDCLabelCaptureSettings *)settingsFromJSONString:(NSString *)JSONString
                                                       error:(NSError **)error

Added in version 6.4.0

Deserializes label capture settings from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.

- updateSettings:fromJSONString:error:
- (nullable SDCLabelCaptureSettings *)updateSettings:(SDCLabelCaptureSettings *)settings
                                      fromJSONString:(NSString *)JSONString
                                               error:(NSError **)error

Added in version 6.4.0

Takes existing label capture settings and updates them by deserializing new or changed properties from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.

- basicOverlayFromJSONString:withMode:error:
- (nullable SDCLabelCaptureBasicOverlay *)
  basicOverlayFromJSONString:(NSString *)JSONString
                    withMode:(SDCLabelCapture *)mode
                       error:(NSError **)error

Added in version 6.4.0

Deserializes a label capture overlay from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.

- updateBasicOverlay:fromJSONString:error:
- (nullable SDCLabelCaptureBasicOverlay *)updateBasicOverlay:(SDCLabelCaptureBasicOverlay *)
                                                             overlay
                                              fromJSONString:(NSString *)JSONString
                                                       error:(NSError **)error

Added in version 6.4.0

Takes an existing label capture overlay and updates it by deserializing new or changed properties from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.

- advancedOverlayFromJSONString:withMode:error:
- (nullable SDCLabelCaptureAdvancedOverlay *)
  advancedOverlayFromJSONString:(NSString *)JSONString
                       withMode:(SDCLabelCapture *)mode
                          error:(NSError **)error

Added in version 6.16.0

Deserializes a label capture advanced overlay from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.

- updateAdvancedOverlay:fromJSONString:error:
- (nullable SDCLabelCaptureAdvancedOverlay *)
  updateAdvancedOverlay:(SDCLabelCaptureAdvancedOverlay *)overlay
         fromJSONString:(NSString *)JSONString
                  error:(NSError **)error

Added in version 6.16.0

Takes an existing label capture advanced overlay and updates it by deserializing new or changed properties from JSON.

An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.