예제 #1
0
        public static JsonObject conv(VBox VB)
        {
            // all VBox implementations are classes - so this ID stuff works
            var J_vb = new JsonObject();

            J_vb["kind"]    = "vbox";
            J_vb["id"]      = ID(VB);
            J_vb["payload"] = VB.value() == null ? "null" : VB.value().ToString();

            var J_preds = new JsonArray();

            foreach (var pred in VB.preds())
            {
                J_preds.Add(ID(pred));
            }
            J_vb["preds"] = J_preds;
            return(J_vb);
        }