@Override
    public HeaderMap deserialize(JsonParser p, DeserializationContext ctxt)
            throws IOException, JsonProcessingException {
        HeaderMap map = new HeaderMap();

        while (p.nextToken() != JsonToken.END_OBJECT) {
            String name = p.getCurrentName();

            p.nextToken();

            if (p.currentToken().isScalarValue()) {
                map.add(name, p.getValueAsString());
            } else {
                ArrayDeque<String> values = new ArrayDeque<>();
                while (p.nextToken() != JsonToken.END_ARRAY) {
                    values.push(p.getValueAsString());
                }
                values.forEach(value -> map.add(name, value));
            }
        }
        return map;
    }
@see com.fasterxml.jackson.databind.JsonDeserializer#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)
gateway/engine/beans/src/main/java/io/apiman/gateway/engine/beans/util/MultiMapDeserializer.java