Configuring custom parsing in ID Scanner - ID Scanner 3.2.1

ID Scanner Plugin Guide 3.2.1

Applies to
ID Scanner 3.2.1
Last updated
2023-03-27
Content type
Guides > Plugin and extension guides
Language
English
Product
ID Scanner
Version
3.2

You can configure custom parsing to add compatibility for a new identification document by editing a configuration .json file.

What you should know

  • Editing custom parsing requires familiarity with the .json format.
  • The configuration file is installed the first time the user scans an identification document with a Gemalto reader.

Procedure

  1. Open Windows Explorer and navigate to %ProgramData%\Genetec\IDScanner\MrzParserConfiguration.json.
  2. Open the MrzParserConfiguration.json file in a text editor.
  3. (To add a new identification document rule) For each parsing rule you want to create, add the following code to the config file and edit as needed:
     {
          "DocumentType": "<type>",
          "CountryCodes": [
            "<code>"
          ],
          "LineCount": <number of MRZ lines in the document>,
          "Fields": [
            {
              "Name": "<field name>",
              "Ranges": [
                {
                  "Line": <line index>,
                  "Start": <index for first character>,
                  "End": <index for last character>
                }
              ]
            }
          ]
        },
    The following elements must be repeated for each range of MRZ information you want to form a field from:
    
                {
                  "Line": <line index>,
                  "Start": <index for first character>,
                  "End": <index for last character>
                }
    So, for an identification document with two lines of MRZ data, you need to determine Line, Start, and End indexes for each piece of the MRZ lines you want to parse.
  4. (to edit an existing identification document rule) Go to the rule for the identification document you want to edit, and make edits to the country code, line count and indexes as needed.
  5. Save and close the file.

Results

The new or updated identification format can now be parsed.

Example

As an example, say that you need to add a new Utopian ID card to the .json file, and that the card has a line count of two. For this example, you need to parse the two ranges of numbers from MRZ line two that correspond to the person's identity number. The entry would be:
 {
      "DocumentType": "ID",
      "CountryCodes": [
        "UTO"
      ],
      "LineCount": 2,
      "Fields": [
        {
          "Name": "DocumentID",
          "Ranges": [
            {
              "Line": 2,
              "Start": 15,
              "End": 20
            },
            {
              "Line": 2,
              "Start": 22,
              "End": 27
            }
          ]
        }
      ]
    },

ID card with custom parsing information highlighted.