Our great sponsors
-
jsonschema
JSONSchema (draft 2020-12, draft 2019-09, draft-7, draft-6, draft-4) Validation using Go (by santhosh-tekuri)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
If I were doing it, I would define struct that match the data you expect and update those struct as the project progresses. Also if I were doing it I'd explicitly not allow values with different types for the same key so that would prevent me from having to declare value types as interface{}. If you want a more general purpose validation of arbitrary JSON, you could define a JSON schema and validate it with a library like this.
NOTE:
The number of mentions on this list indicates mentions on common posts plus user suggested alternatives.
Hence, a higher number means a more popular project.
Related posts
- GitHub - santhosh-tekuri/jsonschema now implements draft2020-12
- github.com/santhosh-tekuri/jsonschema@v4 implements draft 2019-09
- Popular Libraries For Building Type-safe Web Application APIs
- Boost Your Medium Visibility: 12 Essential Tips for Writers
- Get Random Images API for free from Lorem Picsum