def write_SmoothedTrajectories_json_header(method, tolerance, N, M, max_speed_duration):
    """Write a SmoothedTrajectories header to a JSON string."""
    string_list = ['{\n"method" : "', method,
                   '",\n"distance_tolerance" : ', str(tolerance),
                   ',\n"moving_median_samples" : ', str(N),
                   ',\n"moving_average_samples" : ', str(M),
                   ',\n"max_speed_duration" : ', str(max_speed_duration),
                   ',\n"data" : [\n']
    return ''.join(string_list)