Closed Dremora closed 5 years ago
Hi @Dremora , sounds like a nice feature to add, it could be useful to others. Let me think about it and during the next few days, I'll try to implement it. Cheers!
Yes that would be a nice feature.
Awesome library by the way!
Closed via https://github.com/joanllenas/ts.data.json/pull/9 For some reason, standard-version did not create a minor release, just a patch release (0.2.1). Docs are here: https://github.com/joanllenas/ts.data.json#jsondecoderobjectstrict
Anyway, let me know if there are any issues. Cheers!
My use case: I have 1600 JSON files with complex structure that I want to type. The way I want to approach this is by iteratively running the decoder, inspecting the first error message and extending the decoder. I don't know in advance which fields those JSON files have, I want the decoder to help me in finding this out. I thus want the decoder to fail whenever it encounters an unknown object key.
Similar option exists in tcomb-validation is called strict.