参考:Getting started with JSON schema
我一直在阅读JSON模式.我明白这一点
当您谈论数据格式时,您需要元数据
好的,这些模式定义了我正在构建的JSON struct 中允许的内容和不允许的内容.
我的问题是,这些模式是如何实际使用的?例如,如果我在C++程序(或python脚本)中使用JSON文件,我可以按原样使用JSON文件(当然没有任何验证).但是如果我想验证它,我如何使用json模式来验证它呢?有什么推荐的图书馆吗?(我对C++感兴趣,但也欢迎提供有关python的其他信息)
EDIT: I would like to emphasize that the main purpose of this question is to understand how are these schemas practically used?
Are schemas used only for validation? or are there other uses? (I am new to the concept of schemas)