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