UNPKG

wallee

Version:
32 lines (31 loc) 1 kB
import { LabelDescriptorFromJSON, LabelDescriptorToJSON, } from './LabelDescriptor'; /** * Check if a given object implements the Label interface. */ export function instanceOfLabel(value) { return true; } export function LabelFromJSON(json) { return LabelFromJSONTyped(json, false); } export function LabelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'contentAsString': json['contentAsString'] == null ? undefined : json['contentAsString'], 'descriptor': json['descriptor'] == null ? undefined : LabelDescriptorFromJSON(json['descriptor']), 'content': json['content'] == null ? undefined : json['content'], }; } export function LabelToJSON(json) { return LabelToJSONTyped(json, false); } export function LabelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'descriptor': LabelDescriptorToJSON(value['descriptor']), }; }