Resource Base
Table of contents

DSParsedResultItem Class

ParsedResultItem it the basic unit of a parsed result. It stores the field name, value and additional information.

Definition

Assembly: DynamsoftCodeParser.xcframework

  • Objective-C
  • Swift
  1. @interface DSParsedResultItem: DSCapturedResultItem
    
  2. class ParsedResultItem : CapturedResultItem
    

Method Summary

Method Description
getFieldMappingStatus Gets the mapping status of a specified field from the parsed result.
getFieldValidationStatus Gets the validation status of a specified field from the parsed result.
getFieldValue Gets the value of a specified field from the parsed result.

Property Summary

Property Type Description
codeType NSString Gets the code type of the parsed result.
jsonString NSString Gets the parsed result as a JSON formatted string.
parsedFields NSDictionary A NSDictionary object stores the field names and values of the parsed fields.

Method Detail

getFieldMappingStatus

Gets the mapping status of a specified field from the parsed result. Certain fields in the parsed result, such as the residing province or state, are abbreviated (e.g. BC standing for British Columbia). The library takes such fields and maps them to their full form. If the mapping is successful, the MappingStatus will be DSMappingStatusSucceeded. To learn of the other options of MappingStatus, please refer to the link below.

  • Objective-C
  • Swift
  1. - (DSMappingStatus *)getFieldMappingStatus(NSString *)fieldName;
    
  2. func getFieldMappingStatus(_ fieldName:String) -> MappingStatus
    

Parameters

fieldName: The name of the field.

Return Value

Returns a MappingStatus enumeration value representing the mapping status of a specified field.

getFieldValidationStatus

Gets the validation status of a specified field from the parsed result. Certain fields can be validated with one of four possible validation methods: certification, checksum, length, and regex. Whether a field is validated or not, as well as the validation method, is determined by the code specification e.g. AAMVA specification.

  • Objective-C
  • Swift
  1. - (DSValidationStatus *)getFieldValidationStatus(NSString *)fieldName;
    
  2. func getFieldValidationStatus(_ fieldName:String) -> ValidationStatus
    

Parameters

fieldName: The name of the field.

Return Value

Returns a ValidationStatus enumeration value saying whether the validation of a specified field was successful, failed, or if it did not require validation..

getFieldValue

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

  • Objective-C
  • Swift
  1. - (NSString *)getFieldValue(NSString *)fieldName;
    
  2. func getFieldValue(_ fieldName:String) -> String
    

Parameters

fieldName: The name of the field.

Return Value

Returns a string representing the specified field value.

Property Detail

codeType

Returns the code type of the parsed result. It can be one of the following:

  • “AADHAAR”
  • “AAMVA_DL_ID”
  • “AAMVA_DL_ID_WITH_MAG_STRIPE”
  • “MRTD_TD1_ID”
  • “MRTD_TD2_ID”
  • “MRTD_TD2_VISA”
  • “MRTD_TD3_PASSPORT”
  • “MRTD_TD3_VISA”
  • “MRTD_TD2_FRENCH_ID”
  • “SOUTH_AFRICA_DL”
  • “VIN”
  • Objective-C
  • Swift
  1. @property (nonatomic, readonly) NSString * codeType;
    
  2. var codeType: String? { get }
    

jsonString

The parsed result as a JSON formatted string.

  • Objective-C
  • Swift
  1. @property (nonatomic, readonly) NSString * jsonString;
    
  2. var jsonString: String? { get }
    

parsedFields

A NSDictionary object stores the field names and values of the parsed fields. The field names are stored as the key of the HashMap while the field values are stored as the value.

  • Objective-C
  • Swift
  1. @property (nonatomic, readonly) NSDictionary<NSString *, NSString *> * parsedFields;
    
  2. var parsedFields: NSDictionary { get }
    

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 2.x
      • Version 2.0.21
      • Version 2.0.20
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support