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.MediaTypeDEFAULT_CONTENT_TYPEstatic MatchTypeDEFAULT_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 MatchTypegetMatchType()byte[]getRawBytes()StringgetValue()static JsonBodyjson(Object object)static JsonBodyjson(Object object, com.google.common.net.MediaType contentType)static JsonBodyjson(Object object, com.google.common.net.MediaType contentType, MatchType matchType)static JsonBodyjson(Object object, Charset charset)static JsonBodyjson(Object object, Charset charset, MatchType matchType)static JsonBodyjson(Object object, MatchType matchType)static JsonBodyjson(String json)static JsonBodyjson(String json, com.google.common.net.MediaType contentType)static JsonBodyjson(String json, com.google.common.net.MediaType contentType, MatchType matchType)static JsonBodyjson(String json, Charset charset)static JsonBodyjson(String json, Charset charset, MatchType matchType)static JsonBodyjson(String json, MatchType matchType)StringtoString()-
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:
getRawBytesin classBody
-
getMatchType
public MatchType getMatchType()
-
toString
public String toString()
- Overrides:
toStringin classObjectWithJsonToString
-
-