Tabnine Logo
Platform.json
Code IndexAdd Tabnine to your IDE (free)

How to use
json
method
in
playn.core.Platform

Best Java code snippets using playn.core.Platform.json (Showing top 5 results out of 315)

origin: threerings/playn

/**
 * Returns the {@link Json} service.
 */
public static Json json() {
 return platform.json();
}
origin: threerings/tripleplay

protected Json json () { return game().plat.json(); }
protected Log log () { return game().plat.log(); }
origin: threerings/tripleplay

  public RFuture<Library> apply (String text) {
    return decodeLibrary(plat.json().parse(text), baseDir, asyncLoader);
  }
});
origin: threerings/tripleplay

/**
 * @return a String representation of the given Json
 */
public static String toString (Platform plat, Json.Object json, boolean verbose)
{
  Json.Writer writer = plat.json().newWriter().useVerboseFormat(verbose);
  writer.object();
  json.write(writer);
  writer.end();
  return writer.write();
}
origin: threerings/tripleplay

/**
 * Loads a JSON encoded library synchronously.
 * @param baseDir The base directory, containing library.json and texture atlases.
 */
public static Library loadLibrarySync (final Platform plat, String baseDir) throws Exception {
  final ImageLoader syncLoader = new ImageLoader() {
    @Override public Image load (String path) { return plat.assets().getImageSync(path); }
  };
  String text = plat.assets().getTextSync(baseDir + "/library.json");
  Try<Library> result = decodeLibrary(plat.json().parse(text), baseDir, syncLoader).result();
  if (result.isSuccess()) return result.get();
  Throwable error = result.getFailure();
  if (error instanceof Exception) throw (Exception)error;
  else throw new RuntimeException(error);
}
playn.corePlatformjson

Javadoc

Returns the Json service.

Popular methods of Platform

  • log
    Returns the Log service.
  • graphics
    Returns the Graphics service.
  • assets
    Returns the Assets service.
  • input
    Returns the Input service.
  • invokeLater
  • exec
    Returns the Exec service.
  • storage
    Returns the Storage storage service.
  • time
    Returns the current time, as a double value in millis since January 1, 1970, 00:00:00 GMT. This is e
  • type
    Returns the platform Platform.Type.
  • net
    Returns the Net service.
  • reportError
    Called when a backend (or other framework code) encounters an exception that it can recover from, bu
  • setPropagateEvents
  • reportError,
  • setPropagateEvents,
  • tick,
  • audio,
  • dispatchEvent,
  • keyboard,
  • mouse,
  • openURL,
  • pointer

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ImageIO (javax.imageio)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best plugins for Eclipse
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