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