Esempio n. 1
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 Field24B newInstance(Field24B source)
        {
            Field24B cp = new Field24B();

            cp.Components = new List <>(source.Components);
            return(cp);
        }
Esempio n. 2
0
        public static Field24B fromJson(string json)
        {
            Field24B   field      = new Field24B();
            JsonParser parser     = new JsonParser();
            JsonObject jsonObject = (JsonObject)parser.parse(json);

            if (jsonObject.get("qualifier") != null)
            {
                field.Component1 = jsonObject.get("qualifier").AsString;
            }
            if (jsonObject.get("dataSourceScheme") != null)
            {
                field.Component2 = jsonObject.get("dataSourceScheme").AsString;
            }
            if (jsonObject.get("reasonCode") != null)
            {
                field.Component3 = jsonObject.get("reasonCode").AsString;
            }
            return(field);
        }