toJson method

Object? toJson()

The data in export form: a node with a priority becomes a map with .value (for a leaf) or its children plus .priority. So jsonEncode(snapshot) works. Numbers, priorities included, follow the rule of value: the server's 1.0 exports as the int 1.

Implementation

Object? toJson() => _readForm(_node.toJson(exportFormat: true));