| Constructor and Description |
|---|
Json() |
| Modifier and Type | Method and Description |
|---|---|
static StringBuilder |
appendValue(StringBuilder sb,
Object comp) |
static Object |
fromJson(String json)
Parse the JSON string as a javax.script.Bindings instance.
|
static Object |
fromJson(String json,
boolean withBigNumbers,
boolean withTokens) |
static String |
getParserName() |
protected static void |
indent(StringBuilder sb,
int indent) |
static String |
listToJson(Iterable list)
Serializes a JSON-compatible List into a JSON formatted StringBuilder with the specified indent of spaces
|
static void |
listToJson(StringBuilder sb,
int indent,
Iterable value) |
static String |
makeStructureTypes(manifold.api.host.IManifoldHost host,
String nameForStructure,
Bindings bindings,
AbstractJsonTypeManifold tm,
boolean mutable)
Makes a tree of structure types reflecting the Bindings.
|
static IJsonType |
mergeTypes(IJsonType type1,
IJsonType type2) |
static IJsonType |
mergeTypesNoUnion(IJsonType type1,
IJsonType type2) |
static void |
setParserName(String fqn) |
static String |
toJson(Map thisMap)
Serializes this Map instance to a JSON formatted String
|
static void |
toJson(Map thisMap,
StringBuilder sb,
int indent)
Serializes this Map instance into a JSON formatted StringBuilder with the specified indent of spaces
|
static String |
toJson(Object value)
Build a JSON string from the specified
value. |
static void |
toJson(StringBuilder target,
int margin,
Object value)
Build a JSON string in the specified
target from the specified value with the provided left
margin. |
static IJsonType |
transformJsonObject(manifold.api.host.IManifoldHost host,
String name,
manifold.api.fs.IFile source,
JsonSchemaType parent,
Object jsonObj) |
static IJsonType |
transformJsonObject(manifold.api.host.IManifoldHost host,
String name,
JsonSchemaType parent,
Object jsonObj) |
public static String getParserName()
public static void setParserName(String fqn)
public static String toJson(Map thisMap)
public static void toJson(Map thisMap, StringBuilder sb, int indent)
protected static void indent(StringBuilder sb, int indent)
public static StringBuilder appendValue(StringBuilder sb, Object comp)
public static String toJson(Object value)
value. The value must be a valid JSON value:
StringIterable of JSON valuesMap of JSON valuesvaluepublic static void toJson(StringBuilder target, int margin, Object value)
target from the specified value with the provided left
margin. The value must be a valid JSON value:
StringIterable of JSON valuesMap of JSON valuespublic static void listToJson(StringBuilder sb, int indent, Iterable value)
public static String listToJson(Iterable list)
public static Object fromJson(String json)
json - A Standard JSON formatted stringpublic static String makeStructureTypes(manifold.api.host.IManifoldHost host, String nameForStructure, Bindings bindings, AbstractJsonTypeManifold tm, boolean mutable)
public static IJsonType transformJsonObject(manifold.api.host.IManifoldHost host, String name, JsonSchemaType parent, Object jsonObj)
public static IJsonType transformJsonObject(manifold.api.host.IManifoldHost host, String name, manifold.api.fs.IFile source, JsonSchemaType parent, Object jsonObj)
Copyright © 2019. All rights reserved.