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