public class ManBindingsExt extends Object
| Constructor and Description |
|---|
ManBindingsExt() |
| Modifier and Type | Method and Description |
|---|---|
static Bindings |
getJsonContent(Bindings thiz,
String url)
Make a JSON-compatible URL with the arguments from the Bindings.
|
static String |
listToJson(List list)
Serializes a JSON-compatible List into a JSON formatted StringBuilder with the specified indent of spaces
|
static void |
listToJson(StringBuilder sb,
int indent,
List value) |
static String |
makeArguments(Bindings arguments)
Convert this Json Bindings to an arguments String suitable for a Json Url.
|
static URL |
makeUrl(Bindings thiz,
String url)
Make a JSON-compatible URL with the arguments from the Bindings.
|
static String |
makeValue(Object value)
Convert the Object to a String value suitable for a Json Url argument.
|
static Bindings |
postForJsonContent(Bindings thiz,
String url)
Use http POST to pass JSON bindings to this URL and get the full content as a JSON object.
|
static String |
toJson(Bindings thiz)
Serializes this Bindings instance to a JSON formatted String
|
static void |
toJson(Bindings thiz,
StringBuilder sb,
int indent)
Serializes this Bindings instance into a JSON formatted StringBuilder with the specified indent of spaces
|
static String |
toJson(Object obj) |
static String |
toStructure(Bindings thiz,
String nameForStructure)
Generates a static type corresponding with this Bindings object.
|
static String |
toStructure(Bindings thiz,
String nameForStructure,
boolean mutable) |
static String |
toXml(Bindings thiz)
Serializes this Bindings instance to XML
|
static String |
toXml(Bindings thiz,
String name)
Serializes this Bindings instance to XML
|
static void |
toXml(Bindings thiz,
String name,
StringBuilder sb,
int indent) |
static String |
toXml(Object obj) |
static String |
toXml(Object obj,
String name) |
public static String toJson(Bindings thiz)
public static void toJson(Bindings thiz, StringBuilder sb, int indent)
public static void listToJson(StringBuilder sb, int indent, List value)
public static String listToJson(List list)
public static String toXml(Bindings thiz, String name)
public static void toXml(Bindings thiz, String name, StringBuilder sb, int indent)
public static URL makeUrl(Bindings thiz, String url)
public static Bindings postForJsonContent(Bindings thiz, String url)
If an argument is a javax.script.Bindings or a List, it is transformed to JSON. Otherwise, the argument is coerced to a String. All arguments are URL encoded.
ManUrlExt.postForTextContent(URL, Bindings)public static Bindings getJsonContent(Bindings thiz, String url)
Json.fromJson(String)public static String makeArguments(Bindings arguments)
public static String makeValue(Object value)
value - A Json value. On of: Bindings, List, or simple value.public static String toStructure(Bindings thiz, String nameForStructure)
A structure type is a direct mapping of property members to name/value pairs in a Bindings. A property has the same name as the key and follows these rules:
Copyright © 2018. All rights reserved.