JevCodecs

com.softinio.verdict4s.jev.JevCodecs
object JevCodecs

Jev's wire format for the vendor-neutral protocol types.

Kept out of the types' companions on purpose, so that no codec is picked up implicitly: which vendor's encoding applies is a choice, made by JevVendor or by importing these explicitly:

import com.softinio.verdict4s.jev.JevCodecs.given

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
JevCodecs.type

Members list

Value members

Concrete fields

The models endpoint wraps its array in a models field:

The models endpoint wraps its array in a models field:

{"models": [{"name": "jev-latest", "description": "...", "release_date": "..."}]}

That envelope is a wire detail the official SDKs unwrap, and so does the client's models, so it gets a decoder rather than a type of its own. Not a given: it would shadow circe's list decoder for every caller.

Attributes

Givens

Givens

Jev never refuses, so com.softinio.verdict4s.algebra.Answer.Refused has no documented encoding; it is written as a bare {"type": "refusal"} so that a fake can still serve one, and read back by the decoder.

Jev never refuses, so com.softinio.verdict4s.algebra.Answer.Refused has no documented encoding; it is written as a bare {"type": "refusal"} so that a fake can still serve one, and read back by the decoder.

Attributes

Hand-written rather than derived, because three details matter and a generic derivation gets all three wrong:

Hand-written rather than derived, because three details matter and a generic derivation gets all three wrong:

  • an absent Noul criteria means the key is absent, never null
  • a Choice rubric of null is meaningful and must be emitted as an explicit null value under its key, so dropNullValues is wrong
  • key order is deterministic, which is what makes the golden tests stable and identical on the JVM and on Node

Attributes