(subtitles)
return json.dumps(subtitle_dicts)
Serialize a list of subtitles as a JSON blob.
Serialize a list of subtitles as a JSON blob.
Serialize a list of subtitles as a JSON blob .
def json_formatter(subtitles):
    """
    Serialize a list of subtitles as a JSON blob.
    """
    subtitle_dicts = [
        {
            'start': start,
            'end': end,
            'content': text,
        }
        for ((start, end), text)
        in subtitles
    ]
    return json.dumps(subtitle_dicts)
def json_formatter ( subtitles ) : subtitle_dicts = [ { 'start' : start , 'end' : end , 'content' : text , } for ( ( start , end ) , text ) in subtitles ] return json . dumps ( subtitle_dicts )