toJson method

Map<String, dynamic> toJson()

Convert to JSON map.

Implementation

Map<String, dynamic> toJson() => {
  'id': id,
  'text': text,
  'depth': depth,
  'children': children.map((TocEntry e) => e.toJson()).toList(),
};