CockpitVmMemoryNode.fromJson constructor
CockpitVmMemoryNode.fromJson(
- Object? value
Implementation
factory CockpitVmMemoryNode.fromJson(Object? value) {
final json = _object(value, r'$.devtools.vmem.node');
final rawChildren = json['c'];
return CockpitVmMemoryNode(
name: _string(json['n'], r'$.devtools.vmem.node.n'),
sizeBytes: _nonNegativeInt(json['s'], r'$.devtools.vmem.node.s'),
children: rawChildren == null
? const <CockpitVmMemoryNode>[]
: _list(
rawChildren,
r'$.devtools.vmem.node.c',
).map(CockpitVmMemoryNode.fromJson).toList(growable: false),
droppedChildren: json['drop'] == null
? 0
: _nonNegativeInt(json['drop'], r'$.devtools.vmem.node.drop'),
);
}