Skip to main content

Parsing values

Strict mode​

By default, ZodArt parsers operate in strict mode. This means they will only accept input values that match the expected type exactly. Any type mismatch will result in a ParseError.

The only exception is ZObject, which accepts only Map<String, dynamic> as input.

➡️input ⬇️outputListboolDateTimedoubleintMap<String, dynamic>Stringothers
ZArray✅❌❌❌❌❌❌❌
ZBool❌✅❌❌❌❌❌❌
ZDateTime❌❌✅❌❌❌❌❌
ZDouble❌❌❌✅❌❌❌❌
ZEnum❌❌❌❌❌❌✅✅*
ZInt❌❌❌❌✅❌❌❌
ZObject❌❌❌❌❌✅❌❌
ZString❌❌❌❌❌❌✅❌

* Can accept Enum values when using a custom parser.