Parser Result#

Defined in package com.scandit.datacapture.parser

ParsedData#
class ParsedData

Added in version 6.1.0

Holds the result of a successfully parsed data string or raw data. Instances of this class are returned by Parser.parseString() and Parser.parseRawData() methods. The parsed data is divided into fields, each identified by a name.

The data contained in this result object can be accessed in one of the following ways:

  • Through an array of parser fields (see fields).

  • Through a dictionary that maps field names to the field (see fieldsByName).

  • Directly as a JSON string (see jsonString).

jsonString#
@NonNull String getJsonString()

Added in version 6.1.0

The result object as a serialized JSON string.

fieldsByName#
@NonNull Map<@NonNull String, @NonNull ParsedField> getFieldsByName()

Added in version 6.1.0

Provides by-name lookup of the fields. The field names are data format specific. Consult the data format documentation for information on available fields.

fields#
@NonNull List<@NonNull ParsedField> getFields()

Added in version 6.1.0

The order of the fields matches the order in the original data string. The fields are data format specific. Consult the data format documentation for information on available fields.