korzio / djv

Dynamic JSON Schema Validator - Supports draft-04/06
https://www.npmjs.com/package/djv
MIT License
289 stars 31 forks source link

Coercion #49

Open sberan opened 6 years ago

sberan commented 6 years ago

Hi, thanks for writing this library! I like the cleanliness of the code and it appears to be wicked fast 🔥

Have you thought about adding type coercion? It's the only thing keeping me from switching from my current validator. I'd be willing to collaborate on this if it's something you think makes sense in the library.

korzio commented 6 years ago

Hi @sberan, thanks for the comment! Are you talking about this kind of coercion? Cannot find, does it have an official documentation or it should follow ECMAScript specification? Yes, I think this could be a next feature (~2-3 months) to implement after releasing draft-06 support + fix resolution bugs. Yes, it would be nice if you have time to investigate it, I can help with all questions you may have eventually.

sberan commented 6 years ago

@korzio that's precisely what I'm after. There is no spec I'm aware of either unfortunately. I will investigate further 👍