Validating dynamic JSON user input

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • jsonschema

    JSONSchema (draft 2020-12, draft 2019-09, draft-7, draft-6, draft-4) Validation using Go (by santhosh-tekuri)

  • 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.

  • 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.

    WorkOS logo
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.

Suggest a related project

Related posts