ion_extra 0.3.0
ion_extra: ^0.3.0 copied to clipboard
JSON parsing, query decoding, validation, and schema generation for ion_web.
0.3.0 #
- Breaking: upgrade
json_codableto^0.3.0. Getters are named after Dart types (json.int,json.double,json.bool) and collections take an item type (json.list('ids', .int)). - Breaking:
req.query()keeps values as strings and converts them when a getter asks for a type, instead of guessing types up front.?zip=007reads as'007',?phone=+7999...stays a string, and?n=10reads with bothjson.intandjson.double. Booleans must betrueorfalse, and integers must not have a+sign. - Breaking:
req.jsonList()takes aJsonTypefor its items, such asreq.jsonList(.object(ItemDto.fromJson))orreq.jsonList(.string). - Breaking: replace the static
accumulateValidationErrorsflags ofRequestJsonExtractorandRequestQueryExtractorwith afailFastparameter onjson(),jsonList()andquery(). - Breaking:
rawJson()type errors name types like JSON Schema:integer,number,boolean,object,array. - Breaking: query keys are normalized:
json.keysliststagsandfilterfor?tags[]=a&filter[page]=1, and literal keys such asfilter[page]can no longer be read directly. - Query values: an empty value counts as absent except for strings, a single
value is accepted where a list is expected,
idsandids[]are joined in order, and indexed lists of objects such asitems[0][id]=1are supported. - Query maps and lists are read-only.
0.2.0 #
- Upgraded
json_codableto^0.2.0.
0.1.0 #
- Initial version.