| Constructor and Description |
|---|
ManBindingsExt() |
| Modifier and Type | Method and Description |
|---|---|
static Bindings |
deepCopy(Bindings thiz)
Provide a deep copy of this
Bindings using a DataBindings for the copy. |
static <E extends Bindings> |
deepCopy(Bindings thiz,
java.util.function.Function<Integer,E> bindingsSupplier)
Provide a deep copy of this
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 target,
int indent,
List value)
|
static URL |
makeUrl(Bindings thiz,
String url)
Make a JSON-compatible URL with the arguments from this
Bindings. |
static Object |
sendJsonRequest(Bindings thiz,
String httpMethod,
String url)
Use HTTP GET, POST, PUT, PATCH, or DELETE to send this
Bindings to a URL with a JSON response. |
static Object |
sendYamlRequest(Bindings thiz,
String httpMethod,
String url)
Use HTTP GET, POST, PUT, PATCH, or DELETE to send this
Bindings to a URL with a YAML response. |
static String |
toJson(Bindings thiz)
Serializes this
Bindings instance to a JSON formatted String |
static void |
toJson(Bindings thiz,
StringBuilder target,
int margin)
Serializes this
Bindings instance into a JSON formatted StringBuilder target
with the specified indent of spaces. |
static String |
toXml(Bindings thiz)
Serializes this
Bindings instance to XML nested in a root element named "object" |
static String |
toXml(Bindings thiz,
String name)
Serializes this
Bindings instance to XML with in a root element with the specified name |
static void |
toXml(Bindings thiz,
String name,
StringBuilder target,
int indent)
Serializes this
Bindings instance into an XML formatted StringBuilder target
with the specified indent of spaces. |
static String |
toYaml(Bindings thiz)
Serializes this
Bindings instance to a YAML formatted String |
static void |
toYaml(Bindings thiz,
StringBuilder target)
Serializes this
Bindings instance into a YAML 1.2 formatted StringBuilder target
with the specified indent of spaces. |
public static String toJson(Bindings thiz)
Bindings instance to a JSON formatted StringBindings instance serialized to a JSON formatted Stringpublic static String toYaml(Bindings thiz)
Bindings instance to a YAML formatted StringBindings instance serialized to a YAML formatted Stringpublic static void toJson(Bindings thiz, StringBuilder target, int margin)
Bindings instance into a JSON formatted StringBuilder target
with the specified indent of spaces.target - A StringBuilder to write the JSON inmargin - The margin of spaces to indent the resulting block of JSONpublic static void toYaml(Bindings thiz, StringBuilder target)
Bindings instance into a YAML 1.2 formatted StringBuilder target
with the specified indent of spaces.target - A StringBuilder to write the YAML inpublic static void listToJson(StringBuilder target, int indent, List value)
List composed of JSON values, where a JSON value is one of:
target - A StringBuilder to write the JSON inindent - The margin of spaces to indent the JSONvalue - A List composed of JSON values to serializepublic static String listToJson(List list)
listToJson(StringBuilder, int, List) with no indentation and returns a String.public static String toXml(Bindings thiz)
Bindings instance to XML nested in a root element named "object"public static String toXml(Bindings thiz, String name)
Bindings instance to XML with in a root element with the specified namename - The name of the root element to nest the Bindings XMLtoXml(Bindings, String, StringBuilder, int)public static void toXml(Bindings thiz, String name, StringBuilder target, int indent)
Bindings instance into an XML formatted StringBuilder target
with the specified indent of spaces.name - The name of the root element to nest the Bindings XMLtarget - A StringBuilder to write the XML inindent - The margin of spaces to indent the XMLpublic static Object sendJsonRequest(Bindings thiz, String httpMethod, String url)
Bindings to a URL with a JSON response.httpMethod - HTTP method to use: "GET", "POST", "PUT", "PATCH", or "DELETE"url - The URL to send this Bindings toManUrlExt.sendJsonRequest(URL, String, Object)public static Object sendYamlRequest(Bindings thiz, String httpMethod, String url)
Bindings to a URL with a YAML response.httpMethod - HTTP method to use: "GET", "POST", "PUT", "PATCH", or "DELETE"url - The URL to send this Bindings toManUrlExt.sendYamlRequest(URL, String, Object)public static Bindings deepCopy(Bindings thiz)
Bindings using a DataBindings for the copy.
Same as invoking: deepCopy(DataBindings::new)Bindingspublic static <E extends Bindings> E deepCopy(Bindings thiz, java.util.function.Function<Integer,E> bindingsSupplier)
Bindings. Note this method assumes the Bindings is limited to a JSON
style Bindings<String, Value> where Value type is strictly:
String, Number, or BooleanList of ValueBindings of String to ValuebindingsSupplier - Creates the Bindings instance used for the copy and instances for nested Bindings.BindingsCopyright © 2019. All rights reserved.