Deprecated: Return type of NodeIterator::hasChildren() should either be compatible with RecursiveArrayIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/D0GfX on line 11
Deprecated: Return type of NodeIterator::getChildren() should either be compatible with RecursiveArrayIterator::getChildren(): ?RecursiveArrayIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/D0GfX on line 19
Warning: Cannot modify header information - headers already sent by (output started at /in/D0GfX:6) in /in/D0GfX on line 3
Deprecated: Return type of Node::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/D0GfX on line 91
Deprecated: Return type of Node::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/D0GfX on line 102
{
"data": "root",
"children": [
{
"data": "sub1",
"children": [
{
"data": "sub1.1",
"children": []
}
]
},
{
"data": "sub2",
"children": [
{
"data": "sub2.1",
"children": [
{
"data": "sub.2.1.1",
"children": []
}
]
}
]
},
{
"data": "sub3",
"children": []
}
]
}
root
.sub1
..sub1.1
.sub2
..sub2.1
...sub.2.1.1
.sub3
root
.sub1
..sub1.1
.sub2
..sub2.1
...sub.2.1.1
.sub3