module Model.Size exposing ( Size , sizeDecoder ) import Json.Decode as Decode exposing (Decoder) type alias Size = { width: Int , height: Int } sizeDecoder : Decoder Size sizeDecoder = Decode.map2 Size (Decode.field "width" Decode.int) (Decode.field "height" Decode.int)