org.mockserver.model
Class JsonBody

java.lang.Object
  extended by org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
      extended by org.mockserver.model.ObjectWithJsonToString
          extended by org.mockserver.model.Not
              extended by org.mockserver.model.Body
                  extended by org.mockserver.model.BodyWithContentType
                      extended by org.mockserver.model.JsonBody

public class JsonBody
extends BodyWithContentType

Author:
jamesdbloom

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mockserver.model.Body
Body.Type
 
Field Summary
static com.google.common.net.MediaType DEFAULT_CONTENT_TYPE
           
static MatchType DEFAULT_MATCH_TYPE
           
 
Fields inherited from class org.mockserver.model.BodyWithContentType
contentType
 
Fields inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
logger
 
Constructor Summary
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)
           
 
Method Summary
 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()
           
 
Methods inherited from class org.mockserver.model.BodyWithContentType
getCharset, getContentType
 
Methods inherited from class org.mockserver.model.Body
getType
 
Methods inherited from class org.mockserver.model.Not
getNot, isNot, not, not, setNot
 
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
addFieldsExcludedFromEqualsAndHashCode, equals, fieldsExcludedFromEqualsAndHashCode, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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
Constructor Detail

JsonBody

public JsonBody(String json)

JsonBody

public JsonBody(String json,
                MatchType matchType)

JsonBody

public JsonBody(String json,
                Charset charset,
                MatchType matchType)

JsonBody

public JsonBody(String json,
                com.google.common.net.MediaType contentType,
                MatchType matchType)
Method Detail

json

public static JsonBody json(String json)

json

public static JsonBody json(String json,
                            MatchType matchType)

json

public static JsonBody json(String json,
                            Charset charset)

json

public static JsonBody json(String json,
                            Charset charset,
                            MatchType matchType)

json

public static JsonBody json(String json,
                            com.google.common.net.MediaType contentType)

json

public static JsonBody json(String json,
                            com.google.common.net.MediaType contentType,
                            MatchType matchType)

json

public static JsonBody json(Object object)

json

public static JsonBody json(Object object,
                            MatchType matchType)

json

public static JsonBody json(Object object,
                            Charset charset)

json

public static JsonBody json(Object object,
                            Charset charset,
                            MatchType matchType)

json

public static JsonBody json(Object object,
                            com.google.common.net.MediaType contentType)

json

public static JsonBody json(Object object,
                            com.google.common.net.MediaType contentType,
                            MatchType matchType)

getValue

public String getValue()
Specified by:
getValue in class Body

getRawBytes

public byte[] getRawBytes()
Overrides:
getRawBytes in class Body

getMatchType

public MatchType getMatchType()

toString

public String toString()
Overrides:
toString in class ObjectWithJsonToString


Copyright © 2017. All rights reserved.