What is and how to implement parser?

Content of the article

What does the parser do?

Which standards are supported?

How can I implement the parser?

What does the parser do?

The parser component is used to break the data captured into smaller elements that we can then use for example to display ordered data on the screen.

E.g. for a GS1 barcode, which follows a certain standard to encode multiple pieces of information into a single barcode, the Scandit Parser does allow to access the parsed information, run validations as well as accessing the raw data encoded in the barcode.


Scandit Parser is currently available on the platforms as listed here:

Parser Availability per Platform

Which standards are supported?

You can find all supported formats here:

Supported Barcode Standard formats for Parser


How can I implement the parser?

For parsing data first of all you will need to check the different supported data formats. Once you know which data format you're going to parse you will need to follow the specific guide on how to implement it:

Get Started with the Parser (Cordova)

On each you will find a detail explanation on how to implement them. You will need to look into the "Exposed Fields" subsection to understand how each data format is organizing and displaying the data it contains. For example, the documentation explaining the GS1 format can be found at:

Exposed fields according to GS1 standard (Cordova)

Once you’ve decided which data format and fields your application will parse, you can begin the implementation.

The steps for implementing a working parser are:

1- Set the DataCaptureContext, the camera and the parser with the format you want to parse.

2- Implement the BarcodeCaptureListener where you will hand over the parsed data and do what you want with it as well as handling the errors that might come up during the process. On the next screenshot we are displaying the data parsed on the screen (the example is showing a cordova integration).



You can find some snippets and more detail information about the implementation on the following links:

Parser integration (native Android)

Parser integration (native iOS)

Parser integration (Cordova)

Depending on the platform, full sample are available:

Parser Samples (native Android)

Parser Samples (native iOS)







Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request