UNPKG

@regulaforensics/document-reader

Version:

This is an npm module for Regula Document Reader SDK. It allows you to read various kinds of identification documents using your phone's camera.

23 lines (18 loc) 530 B
import { RFIDDataFileType } from './RFIDDataFileType'; export class DataField { data fieldType static fromJson(jsonObject) { if (jsonObject == null) return null; const result = new DataField(); result.data = jsonObject["data"] ?? ""; result.fieldType = jsonObject["fieldType"] ?? RFIDDataFileType.UNSPECIFIED; return result; } toJson() { return { "data": this.data, "fieldType": this.fieldType, } } }