@Override public Aggregations deserialize(final JsonParser parser,
                                                                final DeserializationContext ctxt)
            throws IOException  {

      ObjectNode node = parser.getCodec().readTree(parser);
      return parseAggregations(parser, node);
    }
Allows to de-serialize nested aggregation structures.
criteria/elasticsearch/src/org/immutables/criteria/elasticsearch/Json.java