Package org.mockserver.serialization
Class SloCriteriaSerializer
java.lang.Object
org.mockserver.serialization.SloCriteriaSerializer
Serializer for the
PUT /mockserver/verifySLO endpoint. Mirrors
VerificationSequenceSerializer but parses leniently with a plain
Jackson ObjectMapper — there is no JSON schema for SloCriteria
(the v1 control-plane contract is small and the DTO tolerates absent fields),
so the body is deserialized straight into a SloCriteriaDTO and built
into the model via SloCriteriaDTO.buildObject().
The serialize(SloVerdict) side writes the verdict response. Because
SloVerdict extends ObjectWithJsonToString it serializes cleanly
via the shared ObjectMapperFactory writer, so no dedicated verdict DTO
is required.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(String jsonSloCriteria) deserializeVerdict(String jsonSloVerdict) Parse aSloVerdictresponse body (as written byserialize(SloVerdict)/ returned byPUT /mockserver/verifySLO) back into the model.serialize(SloCriteria sloCriteria) Serialize anSloCriteriato the JSON body submitted toPUT /mockserver/verifySLO.serialize(SloVerdict sloVerdict)
-
Constructor Details
-
SloCriteriaSerializer
-
-
Method Details
-
deserialize
-
serialize
-
serialize
Serialize anSloCriteriato the JSON body submitted toPUT /mockserver/verifySLO. Round-trips withdeserialize(String)viaSloCriteriaDTO. -
deserializeVerdict
Parse aSloVerdictresponse body (as written byserialize(SloVerdict)/ returned byPUT /mockserver/verifySLO) back into the model. BecauseSloVerdictis a plain bean it deserializes directly with no DTO.
-