toJson method

Map<String, dynamic> toJson()

Converts this SttResponseData instance to a JSON map.

This method is useful for serializing the response data for storage or debugging purposes.

Returns a Map<String, dynamic> representing the JSON structure.

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'success': success,
    'final': finalResult,
    'text': text,
    'cause': cause,
    'confidence': confidence,
    'display_text': displayText,
  };
}