imageResource.dhall 580 B

12345678910111213141516171819202122
  1. let Types = ../types/package.dhall
  2. let Prelude = ../lib/prelude.dhall
  3. let JSON = Prelude.JSON
  4. let RenderOptional = ./optionals/package.dhall
  5. let render
  6. : Types.ImageResource → JSON.Type
  7. = λ(r : Types.ImageResource)
  8. → JSON.object
  9. ( toMap
  10. { type = JSON.string r.type
  11. , source = RenderOptional.jsonObject r.source
  12. , params = RenderOptional.jsonObject r.params
  13. , version = RenderOptional.textTextMap r.version
  14. }
  15. )
  16. in RenderOptional.generic Types.ImageResource render