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.

29 lines (23 loc) 788 B
import { Attribute } from './Attribute'; import { RFIDValue } from './RFIDValue'; export class Authority { attributes data friendlyName static fromJson(jsonObject) { if (jsonObject == null) return null; const result = new Authority(); result.data = jsonObject["data"]; result.friendlyName = RFIDValue.fromJson(jsonObject["friendlyName"]); if (jsonObject["attributes"] != null) { result.attributes = []; for (const item of jsonObject["attributes"]) { const attribute = Attribute.fromJson(item); if (attribute != null) { result.attributes.push(attribute); } } } return result; } }