Exemple #1
0
        // JSON SERIALIZATION
        public string asJSON()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("{");

            sb.Append("\"name\":\"" + Name + "\"");

            // inputs
            sb.Append(", \"inputs\": [");                       // begin inputs
            string the_comma = "";

            foreach (AXParameter p in inputs)
            {
                sb.Append(the_comma + p.asJSON());
                the_comma = ", ";
            }
            sb.Append("]");                                         // end inputs

            // outputs
            sb.Append(", \"difference\": " + difference.asJSON());
            sb.Append(", \"differenceRail\": " + differenceRail.asJSON());
            sb.Append(", \"intersection\": " + intersection.asJSON());
            sb.Append(", \"intersectionRail\": " + intersectionRail.asJSON());
            sb.Append(", \"union\": " + union.asJSON());
            sb.Append(", \"grouped\": " + grouped.asJSON());


            // finish
            sb.Append("}");             // end parametri_object

            return(sb.ToString());
        }