def build_json_from_bed(chrom_starts, chrom_ends, chromosomes):
    """ Converts a parsed bed file into a json string in GA4GH schema.

    Args:
        :param list: start range values
        :param list: end range values
        :param list: chromosome range values

    """
    json_ga4gh = '{"features":['
    for i in range(len(chromosomes) + 1):
        if i < len(chromosomes):
            bed_content = '"referenceName":{}, "start":{}, "end":{}'.format(
                '"' + chromosomes[i] + '"', '"' + str(chrom_starts[i]) +
                '"', '"' + str(chrom_ends[i]) + '"')
            json_ga4gh = json_ga4gh + '{' + bed_content + '},'
        else:
            json_ga4gh = json_ga4gh[:len(json_ga4gh) - 1]
    json_ga4gh = json_ga4gh + ']}'
    return json_ga4gh
