toJson method

  1. @override
Map<String, dynamic> toJson()
override

Returns the JSON representation of the operation.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'op': 'insert',
    'path': path,
    'nodes': nodes.map((n) => n.toJson()).toList(growable: false),
  };
}