private String consumeKey() {
        if (s.consumeOptional('"')) {
            String key=s.consumeTo('"');
            s.consume('"');
            return key;
        }
        else if (s.consumeOptional('\'')) {
            String key=s.consumeTo('\'');
            s.consume('\'');
            return key;
        }
        else {
            int keyEnd=findEndOfKey();
            if (keyEnd<0)
                throw new IllegalArgumentException("Expected a key followed by ':' " + s.at());
            return s.consumeToPosition(keyEnd);
        }
    }
Parses a map on the form <code>{key1:value1,key2:value2 ...}</code>

@param string the textual representation of the map
vespajlib/src/main/java/com/yahoo/text/SimpleMapParser.java