jmapio/jmap

Consider using JSON Schema for easy validation?

Relequestual opened this issue · 2 comments

Have you looked into using JSON Schema to define your JSON data structures?
It would mean you could auto validate JSON instances, and provide annotation of fields for those looking for understanding.

An Json schema would be helpful to validate compliance with the spec. Libraries that validate JSON payloads have matured quite a bit

FWIW, I've started typing up a JMAP JSON schema (for code generation purposes): https://git.sr.ht/~emersion/jmap-schema