Resource Base
Table of contents

This documentation is deprecated. It applies only to legacy version 2.x of Capture Vision and must not be used for new development.

Please refer to the latest documentation and Migration Guide, which supersede this content.

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

This page is compatible for:

Is this page helpful?

YesYes NoNo