Scopo
Questa proprietà value true se il nodo era contenuto in un array nel JSON da cui è stato importato.
Viene utilizzata anche per serializzare il nodo come array in JSON.
Sintassi
node.isArrayChild = true
Note
Questa proprietà normalmente viene usata in scrittura per serializzare il nodo come array in JSON.
Esempio di codice
XMLDocument doc = new()
XMLNode root = doc.addElement("root")
XMLNode child = root.addElement("child")
child.setAttribute("attr", "v")
//
Child as child
{
string JSON = doc.saveToString(JSON)
}
//
Child as Array
{
child.isArrayChild = true
string JSON = doc.saveToString(JSON)
}
XMLNode root = doc.addElement("root")
XMLNode child = root.addElement("child")
child.setAttribute("attr", "v")
//
Child as child
{
string JSON = doc.saveToString(JSON)
}
//
Child as Array
{
child.isArrayChild = true
string JSON = doc.saveToString(JSON)
}
Nel primo caso il JSON risultante è
mentre nel secondo è
{ "root": {"child": {"attr": "v" } }}
mentre nel secondo è
{ "root": {"child": [ {"attr": "v" } ] }}
.
Nel primo caso il JSON risultante è
mentre nel secondo è
{ "root": {"child": {"attr": "v" } }}
mentre nel secondo è
{ "root": {"child": [ {"attr": "v" } ] }}
.
Ultima modifica: 23/03/2021 / Validità: da 13.0.5600