public class Json extends Object
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 manifold.rt.api.Bindings instance.
|
static Object |
fromJson(String json,
boolean withBigNumbers,
boolean withTokens) |
static String |
getParserName() |
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 void |
setParserName(String fqn) |
static Object |
toBindings(Object value) |
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 . |
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)
public 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:
String
Iterable
of JSON valuesMap
of JSON valuesvalue
public 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:
String
Iterable
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 stringCopyright © 2024. All rights reserved.