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

How to use
HjsonDsf
in
org.hjson

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

origin: org.hjson/hjson

static String stringify(IHjsonDsfProvider[] dsfProviders, JsonValue value)
{
 for (int i=0, n=dsfProviders.length; i<n; i++) {
  IHjsonDsfProvider dsf=dsfProviders[i];
  try {
   String text=dsf.stringify(value);
   if (text!=null) {
    boolean isInvalid=false;
    char[] textc=text.toCharArray();
    for(char ch : textc) {
     if (isInvalidDsfChar(ch)) { isInvalid=true; break; }
    }
    if (isInvalid || text.length()==0 || textc[0]=='"')
     throw new Exception("value may not be empty, start with a quote or contain a punctuator character except colon: " + text);
    return text;
   }
  }
  catch (Exception exception)
  {
   throw new RuntimeException("DSF-"+dsf.getName()+" failed; "+exception.getMessage());
  }
 }
 return null;
}
origin: org.hjson/hjson

return HjsonDsf.parse(dsfProviders, value.toString().trim());
origin: org.hjson/hjson

String dsfValue=HjsonDsf.stringify(dsfProviders, value);
if (dsfValue!=null)
origin: hjson/hjson-java

return HjsonDsf.parse(dsfProviders, value.toString().trim());
origin: hjson/hjson-java

String dsfValue=HjsonDsf.stringify(dsfProviders, value);
if (dsfValue!=null)
origin: hjson/hjson-java

static String stringify(IHjsonDsfProvider[] dsfProviders, JsonValue value)
{
 for (int i=0, n=dsfProviders.length; i<n; i++) {
  IHjsonDsfProvider dsf=dsfProviders[i];
  try {
   String text=dsf.stringify(value);
   if (text!=null) {
    boolean isInvalid=false;
    char[] textc=text.toCharArray();
    for(char ch : textc) {
     if (isInvalidDsfChar(ch)) { isInvalid=true; break; }
    }
    if (isInvalid || text.length()==0 || textc[0]=='"')
     throw new Exception("value may not be empty, start with a quote or contain a punctuator character except colon: " + text);
    return text;
   }
  }
  catch (Exception exception)
  {
   throw new RuntimeException("DSF-"+dsf.getName()+" failed; "+exception.getMessage());
  }
 }
 return null;
}
org.hjsonHjsonDsf

Javadoc

Provides standard DSF providers.

Most used methods

  • isInvalidDsfChar
  • parse
  • stringify

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • BoxLayout (javax.swing)
  • Option (scala)
  • Top Sublime Text 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