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