Ejemplo 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 Field137 newInstance(Field137 source)
        {
            Field137 cp = new Field137();

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

            if (jsonObject.get("broadcastIndicator") != null)
            {
                field.Component1 = jsonObject.get("broadcastIndicator").AsString;
            }
            if (jsonObject.get("unsequencedBroadcast") != null)
            {
                field.Component2 = jsonObject.get("unsequencedBroadcast").AsString;
            }
            if (jsonObject.get("broadcastIssuer") != null)
            {
                field.Component3 = jsonObject.get("broadcastIssuer").AsString;
            }
            if (jsonObject.get("broadcastNumber") != null)
            {
                field.setComponent4(jsonObject.get("broadcastNumber").AsString);
            }
            return(field);
        }