示例#1
0
        public static Field26C fromJson(string json)
        {
            Field26C   field      = new Field26C();
            JsonParser parser     = new JsonParser();
            JsonObject jsonObject = (JsonObject)parser.parse(json);

            if (jsonObject.get("deliveryDetails") != null)
            {
                field.Component1 = jsonObject.get("deliveryDetails").AsString;
            }
            if (jsonObject.get("deliveryLocation") != null)
            {
                field.Component2 = jsonObject.get("deliveryLocation").AsString;
            }
            if (jsonObject.get("allocation") != null)
            {
                field.Component3 = jsonObject.get("allocation").AsString;
            }
            if (jsonObject.get("type") != null)
            {
                field.Component4 = jsonObject.get("type").AsString;
            }
            if (jsonObject.get("denominationForm") != null)
            {
                field.Component5 = jsonObject.get("denominationForm").AsString;
            }
            return(field);
        }
示例#2
0
        /// <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 Field26C newInstance(Field26C source)
        {
            Field26C cp = new Field26C();

            cp.Components = new List <>(source.Components);
            return(cp);
        }