pub fn parse_captions_json(text: &str, format: &str) -> Result<String, String>Expand description
Reads a subtitle file (format is srt or webvtt) into caption cues, returned as JSON
{ rows, skipped, notes }.
rows holds one caption track’s CaptionCues per row (caption_rows). skipped counts
blocks that were not cues; notes counts markup read but not kept (extraVoices,
droppedTimestamps, droppedClasses, flattened).
§Errors
Refuses an unknown format, a WebVTT file without its header, and cues that need more caption tracks than a project holds.