Tabnine Logo
JsonValue.isString
Code IndexAdd Tabnine to your IDE (free)

How to use
isString
method
in
org.hjson.JsonValue

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

origin: net.akehurst.application.framework/net.akehurst.application.framework.technology.persistence.filesystem

Object convertJsonToJava(final JsonValue value) throws PersistentStoreException {
  if (null == value) {
    return null;
  } else if (value.isString()) {
    return value.asString();
  } else if (value.isNumber()) {
    return value.asDouble();
  } else if (value.isBoolean()) {
    return value.asBoolean();
  } else if (value.isArray()) {
    final List<Object> list = new ArrayList<>();
    for (final JsonValue av : value.asArray()) {
      final Object o = this.convertJsonToJava(av);
      list.add(o);
    }
    return list;
  } else if (value.isObject()) {
    final Map<String, Object> map = new HashMap<>();
    for (final String k : value.asObject().names()) {
      final JsonValue jv = value.asObject().get(k);
      final Object v = this.convertJsonToJava(jv);
      map.put(k, v);
    }
    return map;
  } else {
    throw new PersistentStoreException("Unknown JSON type.", null);
  }
}
origin: net.akehurst.application.framework/net.akehurst.application.framework.technology.persistence.filesystem

if (null == value) {
  return null;
} else if (value.isString()) {
  final T t = this.af.createDatatype(itemType, value.asString());
  return t;
origin: TridentSDK/TridentSDK

for (int i = 0, j = array.size(); i < j; i++) {
  JsonValue el = array.get(i);
  if (el.isString() || el.isNumber() || el.isBoolean())
    cc.addWith(el.asString());
  else if (el.isObject())
for (int i = 0, j = array.size(); i < j; i++) {
  JsonValue el = array.get(i);
  if (el.isString() || el.isNumber() || el.isBoolean())
    cc.addExtra(el.asString());
  else if (el.isObject())
org.hjsonJsonValueisString

Javadoc

Detects whether this value represents a JSON string.

Popular methods of JsonValue

  • toString
    Returns the JSON/Hjson string for this value using the given formatting.
  • readHjson
    Reads a Hjson value from the given string.
  • asObject
    Returns this JSON value as JsonObject, assuming that this value represents a JSON object. If this is
  • asString
    Returns this JSON value as String, assuming that this value represents a JSON string. If this is not
  • asArray
    Returns this JSON value as JsonArray, assuming that this value represents a JSON array. If this is n
  • asBoolean
    Returns this JSON value as a boolean value, assuming that this value is either true or false. If thi
  • isNumber
    Detects whether this value represents a JSON number.
  • writeTo
    Writes the JSON/Hjson representation of this value to the given writer using the given formatting. W
  • asDouble
    Returns this JSON value as a double value, assuming that this value represents a JSON number. If thi
  • equals
    Indicates whether some other object is "equal to" this one according to the contract specified in Ob
  • hashCode
  • readJSON
    Reads a JSON value from the given string.
  • hashCode,
  • readJSON,
  • asFloat,
  • asInt,
  • asLong,
  • getType,
  • isBoolean,
  • isObject,
  • isPunctuatorChar

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • From CI to AI: The AI layer in your organization
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