Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Xamarin.Android and Data Capture SDK Documentation for Xamarin.iOS

IParser Interface Reference

Public Member Functions

ParserResult ParseString (string str)
 
ParserResult ParseRawData (byte[] rawData)
 
void SetOptions (Dictionary< string, object > optionMap)
 

Detailed Description

Interface for Parser

Member Function Documentation

ParserResult ParseString ( string  str)

Parses the data string and returns the contained fields in the result object.

In case parsing of the data failed, an IllegalArgumentException is thrown.

Parameters
strThe string to parse. Must not be null.
Returns
The result object. Before accessing the fields of the result, you must ensure that the string was correctly parsed, that is, IllegalArgumentException hasn't been thrown.
ParserResult ParseRawData ( byte[]  rawData)

Parses the data and returns the contained fields in the result object.

Use this overload in case you have data that cannot be safely represented using unicode code points. In case parsing of the data failed, an IllegalArgumentException is thrown.

Parameters
rawDataThe string to parse. Must not be null.
Returns
The result object. Before accessing the fields of the result, you must ensure that the string was correctly parsed, that is, IllegalArgumentException hasn't been thrown.
void SetOptions ( Dictionary< string, object >  optionMap)

Apply the option map to the parser, allowing the user to fine-tune the behavior of the parser.

Available options depend on the data format and are specified in the respective documentation. In case the options could not be applied, an IllegalArgumentException is thrown.

Parameters
optionMapThe options dictionary. Must not be null.