Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
ajv
The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
-
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.
To build a solid JSON codec layer I use Jzon library (disclosure: I’m the author of Jzon). Here are codecs which do the job for our ingredient list:
As I told already, you might use other tools to create the codecs layer. Take bs-json if it feels better. Or even force Js.Json.t to DTO conversion with Obj.magic if you know what you do.
ReScript Apollo Client generates type-safe bindings to GraphQL schemas. Nice option if you only develop the front-end part in ReScript and the server provides GraphQL API.
JSON Schema might be used to describe data shape along with a validator such as Ajv to verify the validity of a JSON. This can save you from creating codec layers.
JSON Schema might be used to describe data shape along with a validator such as Ajv to verify the validity of a JSON. This can save you from creating codec layers.