Codota Logo
org.hjson
Code IndexAdd Codota to your IDE (free)

How to use org.hjson

Best Java code snippets using org.hjson (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.hjson/hjson

private ParseException error(String message) {
 int absIndex=bufferOffset+index;
 int column=absIndex-lineOffset;
 int offset=isEndOfText() ? absIndex : absIndex-1;
 return new ParseException(message, offset, line, column-1);
}
origin: org.hjson/hjson

private ParseException error(String message) {
 int column=index-lineOffset;
 int offset=isEndOfText()?index:index-1;
 return new ParseException(message, offset, line, column-1);
}
origin: org.hjson/hjson

HjsonParser(String string, HjsonOptions options) {
 buffer=string;
 reset();
 if (options!=null) {
  dsfProviders=options.getDsfProviders();
  legacyRoot=options.getParseLegacyRoot();
 } else {
  dsfProviders=new IHjsonDsfProvider[0];
  legacyRoot=true;
 }
}
origin: org.hjson/hjson

private JsonValue readValue() throws IOException {
 switch(current) {
  case '\'':
  case '"': return readString();
  case '[': return readArray();
  case '{': return readObject(false);
  default: return readTfnns();
 }
}
origin: org.hjson/hjson

private JsonValue readString() throws IOException {
 return new JsonString(readStringInternal(true));
}
origin: org.hjson/hjson

private JsonValue readString() throws IOException {
 return new JsonString(readStringInternal());
}
origin: org.hjson/hjson

private void skipWhiteSpace() throws IOException {
 while (isWhiteSpace()) {
  read();
 }
}
origin: org.hjson/hjson

private ParseException expected(String expected) {
 if (isEndOfText()) {
  return error("Unexpected end of input");
 }
 return error("Expected "+expected);
}
origin: org.hjson/hjson

private void skipIndent(int indent) throws IOException {
 while (indent-->0) {
  if (isWhiteSpace(current) && current!='\n') read();
  else break;
 }
}
origin: org.hjson/hjson

 static boolean needsEscapeML(char c) {
  switch (c) {
   case '\n':
   case '\r':
   case '\t':
    return false;
   default:
    return needsQuotes(c);
  }
 }
}
origin: org.hjson/hjson

/**
 * Returns a JsonValue instance that represents the given <code>int</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(int value) {
 return new JsonNumber(value);
}
origin: org.hjson/hjson

private boolean readIf(char ch) throws IOException {
 if (current!=ch) {
  return false;
 }
 read();
 return true;
}
origin: org.hjson/hjson

int get(Object name) {
 int slot=hashSlotfor (name);
 // subtract 1, 0 stands for empty
 return (hashTable[slot] & 0xff)-1;
}
origin: org.hjson/hjson

/**
 * Returns a hex DSF provider
 *
 * @param stringify true to output all integers as hex values
 * @return DSF provider
 */
public static IHjsonDsfProvider hex(boolean stringify) { return new DsfHex(stringify); }
//  /**
origin: org.hjson/hjson

public HjsonWriter(HjsonOptions options) {
 if (options!=null) {
  dsfProviders=options.getDsfProviders();
 } else {
  dsfProviders=new IHjsonDsfProvider[0];
 }
}
origin: hjson/hjson-java

HjsonParser(String string, HjsonOptions options) {
 buffer=string;
 reset();
 if (options!=null) {
  dsfProviders=options.getDsfProviders();
  legacyRoot=options.getParseLegacyRoot();
 } else {
  dsfProviders=new IHjsonDsfProvider[0];
  legacyRoot=true;
 }
}
origin: hjson/hjson-java

private ParseException error(String message) {
 int absIndex=bufferOffset+index;
 int column=absIndex-lineOffset;
 int offset=isEndOfText() ? absIndex : absIndex-1;
 return new ParseException(message, offset, line, column-1);
}
origin: hjson/hjson-java

private ParseException error(String message) {
 int column=index-lineOffset;
 int offset=isEndOfText()?index:index-1;
 return new ParseException(message, offset, line, column-1);
}
origin: org.hjson/hjson

static boolean needsEscape(char c) {
 switch (c) {
  case '\"':
  case '\\':
   return true;
  default:
   return needsQuotes(c);
 }
}
origin: org.hjson/hjson

/**
 * Returns a JsonValue instance that represents the given <code>double</code> value.
 *
 * @param value the value to get a JSON representation for
 * @return a JSON value that represents the given value
 */
public static JsonValue valueOf(double value) {
 return new JsonNumber(value);
}
org.hjson

Most used classes

  • JsonValue
    Represents a JSON value. This can be a JSON object, an array, a number, a string , or one of the lit
  • JsonObject
    Represents a JSON object, a set of name/value pairs, where the names are strings and the values are
  • HjsonOptions
    Defines options for Hjson
  • JsonArray
    Represents a JSON array, an ordered collection of JSON values. Elements can be added using the add(.
  • DsfHex
  • HjsonDsf,
  • HjsonParser,
  • HjsonWriter,
  • IHjsonDsfProvider,
  • JsonDsf,
  • JsonLiteral$Iv,
  • JsonNumber,
  • JsonObject$HashIndexTable,
  • JsonObject$Member,
  • JsonParser,
  • JsonString,
  • JsonWriter,
  • ParseException,
  • WritingBuffer
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now