module Deck exposing (..) import Json.Decode import Json.Decode.Pipeline as JDP type alias Deck = { id : Int , name : String } decode : Json.Decode.Decoder Deck decode = Json.Decode.succeed Deck |> JDP.required "deck_id" Json.Decode.int |> JDP.required "name" Json.Decode.string