package conformist
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ebc3e3ae1119e4e19e11df940510bf32ab04568d4bdc6ba5f71072a45092b74a
sha512=42d91900faf8849c078b1a7652057fe3b3560223b2b333cf61ceebee6e7bb8f73bdcdee5b9b5ead4c130cdf8c575a085b4e04dbccde202479f7ac0b40bd6b233
CHANGES.md.html
0.3.0 - 2021-03-26
Changed
decode
returns a triple containing(field_name, input, error_msg)
instead of a concatenated string. This makes it easier to extract information.
Added
decode_and_validate
combinesdecode
andvalidate
where the returned value is either the decoded value or a list of errors. When usingdecode_and_validate
, one can forget about the difference betweendecode
andvalidate
and simply forward the list of errors. This covers a common use case.
0.2.1 - 2021-03-16
Changed
Replace
ppx_deriving
withsexplib
[0.2.0] - 2021-03-07
Changed
A field that is
optional
can be missing from the input data or the value can be[]
. Decoding and validation will still work as expected. The decoded value isNone
.
[0.1.0] - 2020-09-29
Added
Conformist.Field.type_
can be used to retrieve a string representation of the typeSupport for custom
encoders
for custom typesSupport for encoding default values if present, this can be used to print schemas
Fixed
Move mandatory field name parameter to the end of create functions in order to get rid of the trailing () argument
[0.0.2] - 2020-09-29
Fixed
Move
fold_left
to top level module and acceptConformist.t
as input
[0.0.1] - 2020-09-20
Added
Initial release supporting
int
,float
,string
,bool
,Ptime.date
and custom types