/// <summary> /// Copy constructor.<br> /// Initializes the components list with a deep copy of the source components list. </summary> /// <param name="source"> a field instance to copy /// @since 7.7 </param> public static Field13A newInstance(Field13A source) { Field13A cp = new Field13A(); cp.Components = new List <>(source.Components); return(cp); }
public static Field13A fromJson(string json) { Field13A field = new Field13A(); JsonParser parser = new JsonParser(); JsonObject jsonObject = (JsonObject)parser.parse(json); if (jsonObject.get("qualifier") != null) { field.Component1 = jsonObject.get("qualifier").AsString; } if (jsonObject.get("numberId") != null) { field.Component2 = jsonObject.get("numberId").AsString; } return(field); }