Exemple #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 Field12A newInstance(Field12A source)
        {
            Field12A cp = new Field12A();

            cp.Components = new List <>(source.Components);
            return(cp);
        }
Exemple #2
0
        public static Field12A fromJson(string json)
        {
            Field12A   field      = new Field12A();
            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("instrumentCode") != null)
            {
                field.Component3 = jsonObject.get("instrumentCode").AsString;
            }
            return(field);
        }