Ejemplo n.º 1
0
 protected KeyReference parseUnquotedJSONKey(final char firstChar) {
   int start = json.getPrevPosition();
   int hash = firstChar;
   int length = 1;
   while (json.hasNext()) {
     char c = json.next();
     // if (c == '"') {
     if (':' == c) { // FIXME: handle"\:"
       // cursor = i + 1;
       return new KeyReference(start, length, hash, json);
     }
     ++length;
     hash = (31 * hash) + c;
   }
   throw new UnexpectedEOF(json.getPosition());
 }