Map<String, String> parse() {
        try {
            Map<String, String> map = new HashMap<>();
            if (parser.nextToken() != JsonToken.START_OBJECT) {
                throw new IllegalInputException("Expected start of object, got '" + parser.currentToken() + "'");
            }
            parse(map, "");
            return map;
        } catch (JsonParseException e) {
            throw new IllegalInputException("Json parse error.", e);
        } catch (IOException e) {
            throw new RuntimeException("Problem reading POSTed data", e);
        }
    }
Parser that consumes json and creates a single level key value map by dotting nested objects.
This is specially tailored for the json query input coming as post.
It does the cheapest possible json parsing delaying number parsing to where it is needed and avoids dreaded toString()
of complicated json object trees.

@author baldersheim
container-search/src/main/java/com/yahoo/search/handler/Json2SingleLevelMap.java