mirror of
https://github.com/logos-storage/nim-serde.git
synced 2026-01-03 06:03:11 +00:00
15 lines
776 B
Nim
15 lines
776 B
Nim
type
|
|
SerdeError* = object of CatchableError
|
|
JsonParseError* = object of SerdeError
|
|
UnexpectedKindError* = object of SerdeError
|
|
SerdeMode* = enum
|
|
OptOut, ## serialize: all object fields will be serialized, except fields marked with 'ignore'
|
|
## deserialize: all json keys will be deserialized, no error if extra json field
|
|
OptIn, ## serialize: only object fields marked with serialize will be serialzied
|
|
## deserialize: only fields marked with deserialize will be deserialized
|
|
Strict ## serialize: all object fields will be serialized, regardless if the field is marked with 'ignore'
|
|
## deserialize: object fields and json fields must match exactly
|
|
SerdeFieldOptions* = object
|
|
key*: string
|
|
ignore*: bool
|