module Model.Size exposing
  ( Size
  , sizeDecoder
  )

import Json.Decode as Json exposing ((:=))

type alias Size =
  { width: Int
  , height: Int
  }

sizeDecoder : Json.Decoder Size
sizeDecoder =
  Json.object2 Size
    ("width" := Json.int)
    ("height" := Json.int)