@Override
    ObjectNode toJson(ObjectMapper mapper) {
      ObjectNode result = mapper.createObjectNode();
      ArrayNode array = result.with("ids").withArray("values");
      values.forEach(v -> array.add(toJsonValue(v, mapper)));
      return result;
    }
@see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html">IDs query</a>
criteria/elasticsearch/src/org/immutables/criteria/elasticsearch/QueryBuilders.java