如何构造HTTP GET请求来过滤JSON响应?

时间:2015-12-17 11:36:53

标签: json rest curl

我正在使用Curl发出以下HTTP GET请求:

curl http://rest.ensembl.org/variation/human/rs56116432?content-type=application

它返回以下JSON对象:

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.3.2</version>
</dependency>

是否可以构造HTTP请求,以便只返回键{"source":"Variants (including SNPs and indels) imported from dbSNP","mappings":[{"location":"9:133256042-133256042","assembly_name":"GRCh38","end":133256042,"seq_region_name":"9","strand":1,"coord_system":"chromosome","allele_string":"C/T","start":133256042},{"location":"CHR_HG2030_PATCH:133256189-133256189","assembly_name":"GRCh38","end":133256189,"seq_region_name":"CHR_HG2030_PATCH","strand":-1,"coord_system":"chromosome","allele_string":"C/T","start":133256189}],"name":"rs56116432","MAF":"0.00259585","ambiguity":"Y","var_class":"SNP","synonyms":[],"evidence":["Multiple_observations","Frequency","1000Genomes","ESP","ExAC"],"ancestral_allele":"C","minor_allele":"T","most_severe_consequence":"missense_variant" 的值而不是在返回请求后过滤数据?

API documentation不包含特定示例。

0 个答案:

没有答案