Frame Source Deserializer
Defined in framework ScanditDataCaptureCore
Warning
The deserialization API is not yet stable and will still change over the coming releases.
- SDCFrameSourceDeserializer
@interface SDCFrameSourceDeserializer : NSObject
Added in version 6.1.0
A deserializer to construct frame sources from JSON. For most use cases it is enough to use SDCCamera.cameraFromJSONString: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.
- + frameSourceDeserializerWithModeDeserializers:
+ (
instancetype
)frameSourceDeserializerWithModeDeserializers:(NSArray<id
<SDCDataCaptureModeDeserializer>> *) modeDeserializersAdded in version 6.1.0
Creates a new deserializer object.
- delegate
@property (nonatomic, weak, nullable)
id
<SDCFrameSourceDeserializerDelegate> delegateAdded in version 6.1.0
The object informed about deserialization events.
- warnings
@property (nonatomic, readonly) NSArray<NSString *> *warnings
Added in version 6.1.0
The warnings produced during deserialization, for example which properties were not used during deserialization.
- - frameSourceFromJSONString:error:
- (nullable
id
<SDCFrameSource>)frameSourceFromJSONString:(NSString *)JSONString error:(NSError **)errorAdded in version 6.1.0
Deserializes a frame source from JSON.
An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.
- - updateFrameSource:fromJSONString:error:
- (nullable
id
<SDCFrameSource>)updateFrameSource:(id
<SDCFrameSource>)frameSource fromJSONString:(NSString *)JSONString error:(NSError **)errorAdded in version 6.1.0
Takes an existing frame source 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.
- - cameraSettingsFromJSONString:error:
- (nullable SDCCameraSettings *)cameraSettingsFromJSONString:(NSString *)JSONString error:(NSError **)error
Added in version 6.1.0
Deserializes camera settings from JSON.
An error is set if the provided JSON does not contain required properties or contains properties of the wrong type.
- - updateCameraSettings:fromJSONString:error:
- (nullable SDCCameraSettings *)updateCameraSettings:(SDCCameraSettings *)settings fromJSONString:(NSString *)JSONString error:(NSError **)error
Added in version 6.1.0
Takes existing camera 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.