# Parse JSON aggs into AggregationBuilder in ES 7.1

**URL:** https://discuss.elastic.co/t/parse-json-aggs-into-aggregationbuilder-in-es-7-1/227189
**Category:** Elasticsearch
**Created:** [April 8, 2020, 5:53pm UTC](https://discuss.elastic.co/t/parse-json-aggs-into-aggregationbuilder-in-es-7-1/227189 "2020-04-08T17:53:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nsaxena](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@nsaxena](https://discuss.elastic.co/u/nsaxena)
#### Post date: [April 8, 2020, 5:53pm UTC](https://discuss.elastic.co/t/parse-json-aggs-into-aggregationbuilder-in-es-7-1/227189/1 "2020-04-08T17:53:21Z")

</div>

Hello,

This question has been asked before and has been [answered](https://discuss.elastic.co/t/how-to-use-the-elasticsearch-java-api-to-build-an-aggregation-from-json/70773/6) but for an older version of ElasticSearch which does not work for 7.1 version.

My requirement is to be able to parse JSON search request containing aggs into AggregationBuilder which then can be set into the SearchSourceBuilder. I have read numerous forums but all of them are for older version of ES.

Is there a way to do this in ES 7.1?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 6, 2020, 5:53pm UTC](https://discuss.elastic.co/t/parse-json-aggs-into-aggregationbuilder-in-es-7-1/227189/2 "2020-05-06T17:53:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
