Package org.mockserver.model
Class JsonBody
-
public class JsonBody extends BodyWithContentType
- Author:
- jamesdbloom
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.net.MediaType
DEFAULT_CONTENT_TYPE
static MatchType
DEFAULT_MATCH_TYPE
-
Fields inherited from class org.mockserver.model.BodyWithContentType
contentType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchType
getMatchType()
byte[]
getRawBytes()
String
getValue()
static JsonBody
json(Object object)
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(Object object, Charset charset)
static JsonBody
json(Object object, Charset charset, MatchType matchType)
static JsonBody
json(Object object, MatchType matchType)
static JsonBody
json(String json)
static JsonBody
json(String json, com.google.common.net.MediaType contentType)
static JsonBody
json(String json, com.google.common.net.MediaType contentType, MatchType matchType)
static JsonBody
json(String json, Charset charset)
static JsonBody
json(String json, Charset charset, MatchType matchType)
static JsonBody
json(String json, MatchType matchType)
String
toString()
-
Methods inherited from class org.mockserver.model.BodyWithContentType
getCharset, getContentType
-
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode, key
-
-
-
-
Field Detail
-
DEFAULT_MATCH_TYPE
public static final MatchType DEFAULT_MATCH_TYPE
-
DEFAULT_CONTENT_TYPE
public static final com.google.common.net.MediaType DEFAULT_CONTENT_TYPE
-
-
Method Detail
-
json
public static JsonBody json(String json, com.google.common.net.MediaType contentType, MatchType matchType)
-
json
public static JsonBody json(Object object, com.google.common.net.MediaType contentType, MatchType matchType)
-
getRawBytes
public byte[] getRawBytes()
- Overrides:
getRawBytes
in classBody
-
getMatchType
public MatchType getMatchType()
-
toString
public String toString()
- Overrides:
toString
in classObjectWithJsonToString
-
-