From cfca18262c1ff48dcb683ddab7d03cf8e55573ff Mon Sep 17 00:00:00 2001 From: Joris Date: Fri, 24 Mar 2017 09:21:04 +0000 Subject: Features/categories --- src/client/elm/Init.elm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/client/elm/Init.elm') diff --git a/src/client/elm/Init.elm b/src/client/elm/Init.elm index 9c6fc3b..d87e870 100644 --- a/src/client/elm/Init.elm +++ b/src/client/elm/Init.elm @@ -5,7 +5,7 @@ module Init exposing import Time exposing (..) -import Json.Decode as Json exposing ((:=)) +import Json.Decode as Decode exposing (Decoder) import Model.Translations exposing (..) import Model.Conf exposing (..) @@ -20,11 +20,11 @@ type alias Init = , windowSize : Size } -decoder : Json.Decoder Init +decoder : Decoder Init decoder = - Json.object5 Init - ("time" := Json.float) - ("translations" := translationsDecoder) - ("conf" := confDecoder) - ("result" := initResultDecoder) - ("windowSize" := sizeDecoder) + Decode.map5 Init + (Decode.field "time" Decode.float) + (Decode.field "translations" translationsDecoder) + (Decode.field "conf" confDecoder) + (Decode.field "result" initResultDecoder) + (Decode.field "windowSize" sizeDecoder) -- cgit v1.2.3