Structure of JSON Result ObjectΒΆ

This document describes the structure and format of the JSON result object as returned by the result object.

The JSON result is an array of objects ([{ ... }, { ... }]), one object for each field found in the data. Each field has 3 attributes:

  • name: Holds the name of the field. Type: string.
  • rawString: Holds the raw string data as found in the code. Type: string
  • parsed: Holds the parsed representation of the field. For example, this field might contain an object with year, month and day values, or just be a number. For a field with a given name, the format of the data is fixed. Type: string, float, int, object boolean, null, or array.

The name and the precise form of the parsed data-structure is format and field specific. Consult the documentation for each data format format docs for more information.

The following example shows the JSON output of the GS1 code 1719060010SCANDIT123:

  [
    {
        "name" : "17",
        "parsed" : {
            "month" : 6,
            "year" : 2019
        },
        "rawString" : "190600"
    },
    {
        "name" : "10",
        "parsed" : "SCANDIT123",
        "rawString" : "SCANDIT123"
    }
]