How to serialize Tree object?
-
I create Data Tree object by my PPL language (Parenthesis Programming Language) for .NET. Here PPL code with commentary, I hope it is clear what I do:
//Creation Tree
var(x[0])(z) // variables x ,zarray(y[3]) // array y
set(y[0])(zero)(0)
set(y[1])(one)(1)
set(y[2])(two)(2)
display // display dataTree
// N1,N2 - nodes
// L0,L2... - leaves
-N1 NS // NameSpace
---N2 Global
-----L0 x [0]
-----L1 z
-----N3 y [Array 3]
-------L0 zero [0]
-------L1 one [1]
-------L2 two [2]
---N2 Localsavedata(Global.data)(Global) // save node Global in file Global.data
shell(type Global.data) // display Global.data by command "type"
result =
(Global
(x [0])
(z)
(y [Array 3]
(zero [0])
(one [1])
(two [2])
)
)It is possible to write manually code in format JSON or XML, but may be exist any package in .NET to convert Global.data to Global.json or Global.xml?