private String readName() throws IOException { if (current=='"' || current=='\'') return readStringInternal(false); StringBuilder name=new StringBuilder(); int space=-1, start=index; while (true) { if (current==':') { if (name.length()==0) throw error("Found ':' but no key name (for an empty key name use quotes)"); else if (space>=0 && space!=name.length()) { index=start+space; throw error("Found whitespace in your key name (use quotes to include)"); } return name.toString(); } else if (isWhiteSpace(current)) { if (space<0) space=name.length(); } else if (current<' ') { throw error("Name is not closed"); } else if (JsonValue.isPunctuatorChar(current)) { throw error("Found '" + (char)current + "' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"); } else name.append((char)current); read(); } }
if (JsonValue.isPunctuatorChar(first)) throw error("Found a punctuator character '" + (char)first + "' when expecting a quoteless string (check your syntax)"); value.append((char)current);
private String readName() throws IOException { if (current=='"' || current=='\'') return readStringInternal(false); StringBuilder name=new StringBuilder(); int space=-1, start=index; while (true) { if (current==':') { if (name.length()==0) throw error("Found ':' but no key name (for an empty key name use quotes)"); else if (space>=0 && space!=name.length()) { index=start+space; throw error("Found whitespace in your key name (use quotes to include)"); } return name.toString(); } else if (isWhiteSpace(current)) { if (space<0) space=name.length(); } else if (current<' ') { throw error("Name is not closed"); } else if (JsonValue.isPunctuatorChar(current)) { throw error("Found '" + (char)current + "' where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace)"); } else name.append((char)current); read(); } }
if (JsonValue.isPunctuatorChar(first)) throw error("Found a punctuator character '" + (char)first + "' when expecting a quoteless string (check your syntax)"); value.append((char)current);
left=='#' || left=='/' && (left1=='*' || left1=='/') || JsonValue.isPunctuatorChar(left) || HjsonParser.tryParseNumber(value, true)!=null || startsWithKeyword(value)) {
left=='#' || left=='/' && (left1=='*' || left1=='/') || JsonValue.isPunctuatorChar(left) || HjsonParser.tryParseNumber(value, true)!=null || startsWithKeyword(value)) {