public class JsonUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JsonUtils.JsonEngine
JSON engine
|
Constructor and Description |
---|
JsonUtils() |
Modifier and Type | Method and Description |
---|---|
static AwsJsonReader |
getJsonReader(Reader in)
Gets a JSON reader.
|
static AwsJsonWriter |
getJsonWriter(Writer out)
Gets a JSON writer.
|
static Map<String,String> |
jsonToMap(Reader in)
Convenient method to convert a JSON string to a map.
|
static Map<String,String> |
jsonToMap(String json)
Convenient method to convert a JSON string to a map.
|
static String |
mapToString(Map<String,String> map)
Encode a string to string map as a JSON string.
|
static void |
setJsonEngine(JsonUtils.JsonEngine jsonEngine)
Sets the JSON engine.
|
public static void setJsonEngine(JsonUtils.JsonEngine jsonEngine)
jsonEngine
- the json engine.public static AwsJsonReader getJsonReader(Reader in)
AmazonClientException
will be thrown.in
- readerpublic static AwsJsonWriter getJsonWriter(Writer out)
AmazonClientException
will be thrown.out
- writerpublic static Map<String,String> jsonToMap(Reader in)
in
- readerpublic static Map<String,String> jsonToMap(String json)
json
- a JSON encoding stringCopyright © 2018. All rights reserved.