JSON schema validation

前端 未结 5 1623
迷失自我
迷失自我 2021-01-30 14:28

Is there a stable library that can validate JSON against a schema?

json-schema.org provides a list of implementations. Notably C and C++ are missing.

Is there a

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-30 14:38

    Is there a stable library that can validate JSON against a schema?

    I found a couple hits on google:

    • From the Chromium project: http://aaronboodman-com-v1.blogspot.com/2010/11/c-version-of-json-schema.html
    • http://avro.apache.org/docs/1.4.1/api/cpp/html/index.html

    You could also plug a Python or Javascript interpreter into your app, and simply run the native version of those validator implementations that you've already found.

    Is there a reason I can't easily find a C++ JSON schema validator?

    I believe JSON originated as a web technology, and C/C++ has fallen out of favor for web app implementation.

提交回复
热议问题