# JSON Response Schema

**URL:** <https://discuss.elastic.co/t/json-response-schema/20985>\
**Category:** Elasticsearch\
**Created:** [November 29, 2014, 8:06am UTC](https://discuss.elastic.co/t/json-response-schema/20985 "2014-11-29T08:06:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![knacktus](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@knacktus](https://discuss.elastic.co/u/knacktus)\
**Post date:** [November 29, 2014, 8:06am UTC](https://discuss.elastic.co/t/json-response-schema/20985/1 "2014-11-29T08:06:06Z")

</div>

Hi there,

is there a JSON schema for the search-API response?

If not, isn't there some template which is used to build the various  
clients? Unfortunately, I can't remember the details and where I found this  
information.

As last resort, what approach would you recommend for Java-Dummies? Where  
would be the starting point to follow the Java classes which are serialised  
to the JSON-reponse on github?

Cheers,

Jan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 29, 2014, 9:51am UTC](https://discuss.elastic.co/t/json-response-schema/20985/2 "2014-11-29T09:51:58Z")

</div>

I don’t think so.

Reading your post, I think you are basically looking for a Java client which can do Java Bean serialization / deserialization as you could have with Hibernate or similar.  
Actually, using Jackson is super easy to serialize your beans in JSON and vice-versa. Look here for example: [https://github.com/dadoonet/legacy-search/blob/01-direct/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L45](https://github.com/dadoonet/legacy-search/blob/01-direct/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L45) [https://github.com/dadoonet/legacy-search/blob/01-direct/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L45](https://github.com/dadoonet/legacy-search/blob/01-direct/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L45)

Deserializing is like this: [https://github.com/elasticsearchfr/hands-on/blob/master/src/test/java/org/elasticsearchfr/handson/beans/BeerHelper.java#L57-63](https://github.com/elasticsearchfr/hands-on/blob/master/src/test/java/org/elasticsearchfr/handson/beans/BeerHelper.java#L57-63) [https://github.com/elasticsearchfr/hands-on/blob/master/src/test/java/org/elasticsearchfr/handson/beans/BeerHelper.java#L57-63](https://github.com/elasticsearchfr/hands-on/blob/master/src/test/java/org/elasticsearchfr/handson/beans/BeerHelper.java#L57-63)

You could also have a look at Spring Data project if you are using Spring. I believe this the kind of thing they provide: [Spring Data Elasticsearch](http://docs.spring.io/spring-data/elasticsearch/docs/1.1.0.M1/reference//html/) [http://docs.spring.io/spring-data/elasticsearch/docs/1.1.0.M1/reference//html/](http://docs.spring.io/spring-data/elasticsearch/docs/1.1.0.M1/reference//html/)

HTH

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 29 nov. 2014 à 09:06, [knacktus@googlemail.com](mailto:knacktus@googlemail.com) a écrit :
> 
> Hi there,
> 
> is there a JSON schema for the search-API response?
> 
> If not, isn't there some template which is used to build the various clients? Unfortunately, I can't remember the details and where I found this information.
> 
> As last resort, what approach would you recommend for Java-Dummies? Where would be the starting point to follow the Java classes which are serialised to the JSON-reponse on github?
> 
> Cheers,
> 
> Jan
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/C7A78954-5DA7-4C9B-8F18-1DFFA5E53C66%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/C7A78954-5DA7-4C9B-8F18-1DFFA5E53C66%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:47am UTC](https://discuss.elastic.co/t/json-response-schema/20985/3 "2017-07-06T00:47:06Z")

</div>


