/// <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 Field12C newInstance(Field12C source) { Field12C cp = new Field12C(); cp.Components = new List <>(source.Components); return(cp); }
public static Field12C fromJson(string json) { Field12C field = new Field12C(); JsonParser parser = new JsonParser(); JsonObject jsonObject = (JsonObject)parser.parse(json); if (jsonObject.get("qualifier") != null) { field.Component1 = jsonObject.get("qualifier").AsString; } if (jsonObject.get("cFICode") != null) { field.Component2 = jsonObject.get("cFICode").AsString; } return(field); }