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.JsonBody

public class JsonBody
extends Body

Author:
jamesdbloom

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mockserver.model.Body
Body.Type
 
Field Summary
static MatchType DEFAULT_MATCH_TYPE
           
 
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)
           
 
Method Summary
 Charset getCharset()
           
 Charset getCharset(Charset defaultIfNotSet)
           
 String getContentType()
           
 MatchType getMatchType()
           
 byte[] getRawBytes()
           
 String getValue()
           
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)
           
 
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.ObjectWithJsonToString
toString
 
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
Constructor Detail

JsonBody

public JsonBody(String json)

JsonBody

public JsonBody(String json,
                MatchType matchType)

JsonBody

public JsonBody(String json,
                Charset charset,
                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)

getValue

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

getRawBytes

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

getMatchType

public MatchType getMatchType()

getCharset

public Charset getCharset()

getCharset

public Charset getCharset(Charset defaultIfNotSet)
Overrides:
getCharset in class Body

getContentType

public String getContentType()
Overrides:
getContentType in class Body


Copyright © 2015. All rights reserved.