How to use the @glennsl/bs-json/src/Json_decode.bs.js.field 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 / CardImage.js View on Github external
function decoder(json) {
  return /* record */[/* thumbnail */Json_decode.field("thumbnail", Json_decode.string, json)];
}
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 phated / mxdbmobile / src / card / Character.js View on Github external
function decoder(json) {
  return /* record */[
          /* uid */Json_decode.field("uid", Json_decode.string, json),
          /* title */Json_decode.field("title", Json_decode.string, json),
          /* subtitle */Json_decode.field("subtitle", Json_decode.string, json),
          /* trait */Json_decode.field("trait", (function (param) {
                  return Json_decode.field("name", Json_decode.string, param);
                }), json),
          /* mp */Json_decode.field("mp", MP$Mxdbmobile.decoder, json),
          /* stats */Json_decode.field("stats", StatList$Mxdbmobile.decoder, json),
          /* effect */Json_decode.field("effect", Effect$Mxdbmobile.decoder, json),
          /* image */Json_decode.field("image", CardImage$Mxdbmobile.decoder, json)
        ];
}
github phated / mxdbmobile / src / card / Battle.js View on Github external
function decoder(json) {
  return /* record */[
          /* uid */Json_decode.field("uid", Json_decode.string, json),
          /* title */Json_decode.field("title", Json_decode.string, json),
          /* mp */Json_decode.field("mp", MP$Mxdbmobile.decoder, json),
          /* stat */Json_decode.field("stats", BattleStat$Mxdbmobile.decoder, json),
          /* effect */Json_decode.field("effect", Effect$Mxdbmobile.decoder, json),
          /* image */Json_decode.field("image", CardImage$Mxdbmobile.decoder, json)
        ];
}
github phated / mxdbmobile / src / card / Event.js View on Github external
function decoder(json) {
  return /* record */[
          /* uid */Json_decode.field("uid", Json_decode.string, json),
          /* title */Json_decode.field("title", Json_decode.string, json),
          /* mp */Json_decode.field("mp", MP$Mxdbmobile.decoder, json),
          /* effect */Json_decode.field("effect", Effect$Mxdbmobile.decoder, json),
          /* image */Json_decode.field("image", CardImage$Mxdbmobile.decoder, json)
        ];
}
github phated / mxdbmobile / src / card / Battle.js View on Github external
function decoder(json) {
  return /* record */[
          /* uid */Json_decode.field("uid", Json_decode.string, json),
          /* title */Json_decode.field("title", Json_decode.string, json),
          /* mp */Json_decode.field("mp", MP$Mxdbmobile.decoder, json),
          /* stat */Json_decode.field("stats", BattleStat$Mxdbmobile.decoder, json),
          /* effect */Json_decode.field("effect", Effect$Mxdbmobile.decoder, json),
          /* image */Json_decode.field("image", CardImage$Mxdbmobile.decoder, json)
        ];
}
github phated / mxdbmobile / src / card / Character.js View on Github external
function decoder(json) {
  return /* record */[
          /* uid */Json_decode.field("uid", Json_decode.string, json),
          /* title */Json_decode.field("title", Json_decode.string, json),
          /* subtitle */Json_decode.field("subtitle", Json_decode.string, json),
          /* trait */Json_decode.field("trait", (function (param) {
                  return Json_decode.field("name", Json_decode.string, param);
                }), json),
          /* mp */Json_decode.field("mp", MP$Mxdbmobile.decoder, json),
          /* stats */Json_decode.field("stats", StatList$Mxdbmobile.decoder, json),
          /* effect */Json_decode.field("effect", Effect$Mxdbmobile.decoder, json),
          /* image */Json_decode.field("image", CardImage$Mxdbmobile.decoder, json)
        ];
}
github phated / mxdbmobile / src / CardList.js View on Github external
function decode(json) {
  return /* record */[
          /* characters */Json_decode.field("characters", (function (param) {
                  return Json_decode.array(Character$Mxdbmobile.decoder, param);
                }), json),
          /* events */Json_decode.field("events", (function (param) {
                  return Json_decode.array(Event$Mxdbmobile.decoder, param);
                }), json),
          /* battles */Json_decode.field("battles", (function (param) {
                  return Json_decode.array(Battle$Mxdbmobile.decoder, param);
                }), json)
        ];
}
github reasonml-old / reason-react-example / src / fetch / FetchExample.bs.js View on Github external
function dogs(json) {
  var __x = Json_decode.field("message", (function (param) {
          return Json_decode.array(Json_decode.string, param);
        }), json);
  return Belt_Array.map(__x, (function (dog) {
                return dog;
              }));
}