json-type-validation
json-type-validation copied to clipboard
TypeScript JSON type validation
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.1 to 5.7.4. Commits 6370e90 Mark version 5.7.4 fbc15b1 More rigorously check surrogate pairs in regexp validator 910e62b Mark version 5.7.3 3442a80 Make generate-identifier-regex capable of rewriting...
Just discovered this awesome library. Just what I was looking for! Thanks very much. I had a look at the code for the object decoder and noted that it [iterates...
Currently the dict decoder only supports keys as string types : https://github.com/mojotech/json-type-validation/blob/c28d34dd7ecc3d89210573abba56f7cf91ae53cf/src/decoder.ts#L403 Would you accept a pull request to provide the ability to decode dicts with numbers as keys? Happy...
Sometimes the convention from the server in json doesn't directly map to the styles on the front end. For example, data from the API may be in `snake_case` when the...
Many APIs provide missing data fields with a value of `null` (see issue #29). As a consumer of such an API using TypeScript and this very library it is currently...
Given a TS enum ```typescript enum Directions { North, South, East, West } ``` We currently write the decoder as ```typescript const directionsDecoder: Decoder = oneOf( constant(Directions.North), constant(Directions.South), constant(Directions.East), constant(Directions.West)...
- Improve how error messages are constructed when a decoder fails. I still don't love it, but it's a step in the right direction. - Add decoders and utilities to...
Recently I've been exploring ways to require that the `optional` decoder be used for fields that are optional. From that process I've realized that I need to make a number...
WIP, but all the parts are in place.