/// <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 Field19B newInstance(Field19B source) { Field19B cp = new Field19B(); cp.Components = new List <>(source.Components); return(cp); }
public static Field19B fromJson(string json) { Field19B field = new Field19B(); 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); } if (jsonObject.get("amount") != null) { field.setComponent3(jsonObject.get("amount").AsString); } return(field); }