congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HjsonOptions
Code IndexAdd Tabnine to your IDE (free)

How to use
HjsonOptions
in
org.hjson

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

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

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

private static boolean test(String name, String file, boolean inputCr, boolean outputCr) throws Exception {
 int extIdx=file.lastIndexOf('.');
 boolean isJson=extIdx>=0 && file.substring(extIdx).equals(".json");
 boolean shouldFail=name.startsWith("fail");
 JsonValue.setEol(outputCr?"\r\n":"\n");
 String text=load(file, inputCr);
 try {
  HjsonOptions opt=new HjsonOptions();
  opt.setParseLegacyRoot(false);
  JsonValue data=JsonValue.readHjson(text, opt);
  String data1=data.toString(Stringify.FORMATTED);
  String hjson1=data.toString(Stringify.HJSON);
  if (!shouldFail) {
   JsonValue result=JsonValue.readJSON(load(name+"_result.json", inputCr));
   String data2=result.toString(Stringify.FORMATTED);
   String hjson2=load(name+"_result.hjson", outputCr);
   if (!data1.equals(data2)) return failErr(name, "parse", data1, data2);
   if (!hjson1.equals(hjson2)) return failErr(name, "stringify", hjson1, hjson2);
   if (isJson) {
    String json1=data.toString(), json2=JsonValue.readHjson(text, opt).toString();
    if (!json1.equals(json2)) return failErr(name, "json chk", json1, json2);
   }
  }
  else return failErr(name, "should fail", null, null);
 }
 catch (Exception e) {
  if (!shouldFail) return failErr(name, "exception", e.toString(), "");
 }
 return true;
}
origin: hjson/hjson-java

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;
 }
}
org.hjsonHjsonOptions

Javadoc

Defines options for Hjson

Most used methods

  • getDsfProviders
    Returns the DSF providers.
  • getParseLegacyRoot
    Detects whether objects without root braces are supported.
  • <init>
  • setParseLegacyRoot
    Sets whether root braces should be emitted.

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now