Converts the FormModel into a JSON-compatible map.
Map<String, dynamic> toJson() { return {'_id': id, 'path': path, 'title': title, 'components': components.map((c) => c.toJson()).toList()}; }