checked_json 0.1.0
checked_json: ^0.1.0 copied to clipboard
A JSON object type you only get by checking a value, with typed readers that name the field that is absent or the wrong shape.
Changelog #
0.1.0 #
- Add
JsonObject, an extension type overMap<String, Object?>that can only be made from raw data through a door that checks it (JsonObject.decode,JsonObject.parse), with typed readers (string,integer,number,boolean,object,list,strings,objects, each with anOrNulltwin) plushasandraw. - Add
JsonFieldException, theFormatExceptiona reader throws naming the field that is absent or the wrong shape, and the shape it wanted. - Add
wholeNumber, which reads3or3.0as anintand refuses fractions and doubles of 2^53 or more in size. - Licensed Apache-2.0.