public final class Json extends Object
| Modifier and Type | Method and Description |
|---|---|
static com.fasterxml.jackson.databind.JsonNode |
asJson(Response response)
Converts the content of the response to a JSON node.
|
static com.fasterxml.jackson.databind.JsonNode |
asJson(String json)
Converts the given string to a JSON node.
|
static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> |
containingValue(org.hamcrest.Matcher<?> matcher)
Creates a new instance of ContainingValue.
|
static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> |
hasJsonArray(String fieldName,
org.hamcrest.Matcher<?> matcher)
Creates a new instance of HasJsonArray.
|
static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> |
hasJsonValue(String fieldName,
org.hamcrest.Matcher<?> matcher)
Creates a new instance of HasJsonValue.
|
static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> |
withSize(org.hamcrest.Matcher<Integer> matcher)
Creates a new instance of WithSize.
|
static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> |
withValueAt(int position,
org.hamcrest.Matcher<?> matcher)
Creates a new instance of WithValueAt.
|
public static com.fasterxml.jackson.databind.JsonNode asJson(Response response)
response - The response whose content is to be convertedpublic static com.fasterxml.jackson.databind.JsonNode asJson(String json)
json - The string which is to be convertedpublic static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> hasJsonValue(String fieldName, org.hamcrest.Matcher<?> matcher)
fieldName - The name of the field in the JSON node which will be evaluatedmatcher - The matcher to use for evaluationpublic static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> hasJsonArray(String fieldName, org.hamcrest.Matcher<?> matcher)
fieldName - The name of the field in the JSON node which will be evaluatedmatcher - The matcher to use for evaluationpublic static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> containingValue(org.hamcrest.Matcher<?> matcher)
matcher - The matcher to use for evaluationpublic static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> withValueAt(int position,
org.hamcrest.Matcher<?> matcher)
position - The position of the value to be evaluatedmatcher - The matcher to use for evaluationpublic static org.hamcrest.TypeSafeMatcher<com.fasterxml.jackson.databind.JsonNode> withSize(org.hamcrest.Matcher<Integer> matcher)
matcher - The matcher to use for evaluationCopyright © 2013. All Rights Reserved.