How to use the @glennsl/bs-json/src/Json_decode.bs.js.optional function in @glennsl/bs-json

To help you get started, we’ve selected a few @glennsl/bs-json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phated / mxdbmobile / src / card / Effect.js View on Github external
function decoder(json) {
  return /* record */[
          /* symbol */Json_decode.field("symbol", Symbol$Mxdbmobile.decoder, json),
          /* text */Json_decode.optional((function (param) {
                  return Json_decode.field("text", Json_decode.string, param);
                }), json)
        ];
}
github glennsl / refetch / examples / github.bs.js View on Github external
/* description */Json_decode.field("description", (function (param) {
                  return Json_decode.optional(Json_decode.string, param);
                }), json),
          /* stars */Json_decode.field("stargazers_count", Json_decode.$$int, json),