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) => string;
    getFieldRawValue: (fieldName: string) => 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): string;

Parameters

fieldName: specifies the name of the field.

Return Value

A string which contains the field value.

Code Snippet

parser.getFieldValue("passportNumber");

getFieldRawValue

Gets the value of a specified field from the parsed result, without mapping process.

getFieldRawValue(fieldName: string): string;

Parameters

fieldName: specifies the name of the field.

Return Value

A string which contains the field raw value.

Code Snippet

parser.getFieldRawValue("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

Is this page helpful?

YesYes NoNo