This is a great tool to encode/decode 
: http://noredink.github.io/json-to-elm/

El lunes, 1 de agosto de 2016, 11:11:04 (UTC-4), Aditya Vishwakarma 
escribió:
>
> If you wish to know how to do it, then take a look at this : 
> https://github.com/adityav/elm-reddit-listing/blob/master/src/Decoders.elm#L14
>
> Once you understand how it is done, you can use 
> http://package.elm-lang.org/packages/NoRedInk/elm-decode-pipeline/1.1.2 
> package. 
>
> On Monday, 1 August 2016 17:51:24 UTC+5:30, Petr Huřťák wrote:
>>
>> For 8 fields or less I can do
>>
>> import Json.Decode as Decode exposing ((:=))
>>
>> collectionDecoder : Decode.Decoder (List Test)
>> collectionDecoder =
>>     Decode.list
>>         (Decode.object8 Test
>>             ("id" := Decode.int)
>>             ...
>>         )
>>
>>
>> How to decode JSON object with more than 8 fields?
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to