private String readKey() {
        buf.reset();
        switch (c) {
        case '"': case '\'': return readString();
        default:
            for (;;) {
                switch (c) {
                case ':': case ' ': case '\t': case '\n': case '\r': case '\0': return buf.toString(StandardCharsets.UTF_8);
                default:
                    buf.put(c);
                    next();
                    break;
                }
            }
        }
    }
Decode bytes as a UTF-8 JSON into Slime, or throw {@link JsonParseException} on invalid JSON.
vespajlib/src/main/java/com/yahoo/slime/JsonDecoder.java