public class JsonBody extends BodyWithContentType
Modifier and Type | Field and Description |
---|---|
static com.google.common.net.MediaType |
DEFAULT_CONTENT_TYPE |
static MatchType |
DEFAULT_MATCH_TYPE |
contentType
Constructor and Description |
---|
JsonBody(String json) |
JsonBody(String json,
Charset charset,
MatchType matchType) |
JsonBody(String json,
MatchType matchType) |
JsonBody(String json,
com.google.common.net.MediaType contentType,
MatchType matchType) |
Modifier and Type | Method and Description |
---|---|
MatchType |
getMatchType() |
byte[] |
getRawBytes() |
String |
getValue() |
static JsonBody |
json(Object object) |
static JsonBody |
json(Object object,
Charset charset) |
static JsonBody |
json(Object object,
Charset charset,
MatchType matchType) |
static JsonBody |
json(Object object,
MatchType matchType) |
static JsonBody |
json(Object object,
com.google.common.net.MediaType contentType) |
static JsonBody |
json(Object object,
com.google.common.net.MediaType contentType,
MatchType matchType) |
static JsonBody |
json(String json) |
static JsonBody |
json(String json,
Charset charset) |
static JsonBody |
json(String json,
Charset charset,
MatchType matchType) |
static JsonBody |
json(String json,
MatchType matchType) |
static JsonBody |
json(String json,
com.google.common.net.MediaType contentType) |
static JsonBody |
json(String json,
com.google.common.net.MediaType contentType,
MatchType matchType) |
String |
toString() |
getCharset, getContentType
equals, fieldsExcludedFromEqualsAndHashCode, hashCode, key
public static final MatchType DEFAULT_MATCH_TYPE
public static final com.google.common.net.MediaType DEFAULT_CONTENT_TYPE
public JsonBody(String json)
public static JsonBody json(String json, com.google.common.net.MediaType contentType, MatchType matchType)
public static JsonBody json(Object object, com.google.common.net.MediaType contentType, MatchType matchType)
public byte[] getRawBytes()
getRawBytes
in class Body
public MatchType getMatchType()
public String toString()
toString
in class ObjectWithJsonToString
Copyright © 2018. All rights reserved.