Parser

Defined in namespace Scandit.DataCapture.Parser

Parser
class Parser : IDataCaptureComponent

Added in version 6.5.0

Create()
static Parser Create(DataCaptureContext dataCaptureContext, ParserDataFormat dataFormat)

Added in version 6.5.0

Create new parser for the provided data format and context. The license key with which the data capture context was constructed must have the parser feature enabled.

In case the parser could not be constructed, an exception is raised. Information on why creation failed is contained in the exception error message.

FromJson()
static Parser FromJson(DataCaptureContext dataCaptureContext, string jsonData)

Added in version 6.5.0

Construct a new parser with the provided JSON serialization.

ParseString()
ParsedData ParseString(string data)

Added in version 6.5.0

Parses the data string and returns the contained field in the result object. Typical inputs to this method is the data contained in a barcode (see Barcode.Data)

In case the data string could not be parsed, an exception is raised. More detailed information on why creation failed is contained in the exception error message.

ParseRawData()
ParsedData ParseRawData(byte[] data)

Added in version 6.5.0

Parses the raw data and returns the contained field in the result object. Typical inputs to this method is the raw data of a barcode (see Barcode.RawData).

In case the data string could not be parsed, an exception is raised. More detailed information on why creation failed is contained in the exception error message.

SetOptions()
void SetOptions(IDictionary<string, object> options)

Added in version 6.5.0

Set the provided options on the parser.

Available options depend on the data format type of the parser and are documented for each of the supported data formats.

In case the options are invalid, an exception is raised. More detailed information on why creation failed is contained in the exception error message.

ComponentId
string ComponentId { get; }

Added in version 6.5.0

Implemented from IDataCaptureComponent. See IDataCaptureComponent.ComponentId.

UpdateFromJson()
void UpdateFromJson(string jsonData)

Added in version 6.5.0

Updates the parser according to a JSON serialization.