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