/** * Returns a JsonValue instance that represents the given string. * * @param string the string to get a JSON representation for * @return a JSON value that represents the given string */ public static JsonValue valueOf(String string) { return string==null ? NULL : new JsonString(string); }
/** * Returns a JsonValue instance that represents the given string. * * @param string the string to get a JSON representation for * @return a JSON value that represents the given string */ public static JsonValue valueOf(String string) { return string==null ? NULL : new JsonString(string); }
private JsonValue readString() throws IOException { return new JsonString(readStringInternal(true)); }
private JsonValue readString() throws IOException { return new JsonString(readStringInternal()); }
private JsonValue readString() throws IOException { return new JsonString(readStringInternal()); }
private JsonValue readString() throws IOException { return new JsonString(readStringInternal(true)); }
static JsonValue parse(IHjsonDsfProvider[] dsfProviders, String value) { for (int i=0, n=dsfProviders.length; i<n; i++) { IHjsonDsfProvider dsf=dsfProviders[i]; try { JsonValue res=dsf.parse(value); if (res!=null) return res; } catch (Exception exception) { throw new RuntimeException("DSF-"+dsf.getName()+" failed; "+exception.getMessage()); } } return new JsonString(value); }
static JsonValue parse(IHjsonDsfProvider[] dsfProviders, String value) { for (int i=0, n=dsfProviders.length; i<n; i++) { IHjsonDsfProvider dsf=dsfProviders[i]; try { JsonValue res=dsf.parse(value); if (res!=null) return res; } catch (Exception exception) { throw new RuntimeException("DSF-"+dsf.getName()+" failed; "+exception.getMessage()); } } return new JsonString(value); }