isLayoutDocumentJson function
Whether json is a layout document: a nodes map holding a typed node.
Implementation
bool isLayoutDocumentJson(Object? json) {
final nodes = readMap(readMap(json)?['nodes']);
return nodes != null && nodes.values.any((n) => readMap(n)?['type'] is String);
}