Resource Base
Table of contents

ParsedResultItem

The ParsedResultItem interface provides a structure representing the result items returned by Dynamsoft Code Parser.

interface ParsedResultItem extends Core.CapturedResultItem {
    codeType: string;
    jsonString: string;
    getFieldValue: (fieldName: string) => Promise<string>;
    getFieldMappingStatus: (fieldName: string) => EnumMappingStatus;
    getFieldValidationStatus: (fieldName: string) => EnumValidationStatus;
}

codeType

Returns the code type of the parsed result.

codeType: string;

jsonString

Returns the parsed result as a JSON formatted string.

jsonString: string;

getFieldValue

Gets the value of a specified field from the parsed result.

getFieldValue(fieldName: string): Promise<string>;

Parameters

fieldName: specifies the name of the field.

Return Value

A promise resolving to a string which contains the field value.

Code Snippet

await parser.getFieldValue("passportNumber");

getFieldMappingStatus

Gets the mapping status of a specified field from the parsed result.

getFieldMappingStatus: (fieldName: string) => EnumMappingStatus;

Parameters

fieldName: specifies the name of the field.

Return Value

A value that indicates whether the mapping succeeded.

Code Snippet

await parser.getFieldMappingStatus("nationality");

See Also

getFieldValidationStatus

Gets the validation status of a specified field from the parsed result.

getFieldValidationStatus: (fieldName: string) => EnumValidationStatus;

Parameters

fieldName: specifies the name of the field.

Return Value

A value that indicates whether the validation succeeded.

Code Snippet

await parser.getFieldValidationStatus("passportNumber");

See Also

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

latest version

    • Latest version(2.2.10)
    • Version 2.x
      • Version 2.0.20
    • Version 1.x
      • Version 1.1.0
      • Version 1.0.2
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support