Map<String, dynamic> toJson() { return { 'value': value, 'positions': positions.map((item) => item.toJson()).toList(), }; }