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