├── .gitignore ├── DecodeNestedList.elm ├── DecodeNestedObject.elm ├── DecodeOddlyShapedObject.elm ├── DecodeSimpleString.elm ├── HandleHttpError.elm ├── README.md └── elm-package.json /.gitignore: -------------------------------------------------------------------------------- 1 | elm-stuff 2 | elm.js 3 | -------------------------------------------------------------------------------- /DecodeNestedList.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (..) 2 | import Html.App as Html 3 | import Html.Attributes exposing (..) 4 | import Html.Events exposing (..) 5 | import Http 6 | import Json.Decode as Json exposing ((:=)) 7 | import Task 8 | import String 9 | 10 | -- https://api.myjson.com/bins/yws2 11 | 12 | -- { 13 | -- "title": "This is an amazing title", 14 | -- "data": [ 15 | -- { 16 | -- "id": 1, 17 | -- "name": "foo" 18 | -- }, 19 | -- { 20 | -- "id": 2, 21 | -- "name": "bar" 22 | -- }, 23 | -- { 24 | -- "id": 3, 25 | -- "name": "baz" 26 | -- } 27 | -- ], 28 | -- "obj": { 29 | -- "title": "I'm a nested object" 30 | -- }, 31 | -- "members": [ 32 | -- { 33 | -- "id": 4, 34 | -- "name": "garply", 35 | -- "profile": { 36 | -- "avatar": "some_path_to_garply" 37 | -- } 38 | -- }, 39 | -- { 40 | -- "id": 5, 41 | -- "name": "waldo", 42 | -- "profile": { 43 | -- "avatar": "some_path_to_waldo" 44 | -- } 45 | -- }, 46 | -- { 47 | -- "id": 6, 48 | -- "name": "fred", 49 | -- "profile": { 50 | -- "avatar": "some_path_to_fred" 51 | -- } 52 | -- } 53 | -- ] 54 | -- } 55 | 56 | main = 57 | Html.program 58 | { init = init 59 | , view = view 60 | , update = update 61 | , subscriptions = subscriptions 62 | } 63 | 64 | 65 | -- Types 66 | 67 | 68 | type alias Model = 69 | { url : String 70 | , result : (List Item) 71 | , error : Bool 72 | } 73 | 74 | 75 | type alias Item = 76 | { name: String 77 | , id: Int 78 | } 79 | 80 | 81 | -- MODEL 82 | 83 | 84 | initialModel : Model 85 | initialModel = { 86 | url = "" 87 | , result = [] 88 | , error = False 89 | } 90 | 91 | 92 | init : (Model, Cmd Msg) 93 | init = 94 | (initialModel, Cmd.none) 95 | 96 | 97 | -- UPDATE 98 | 99 | 100 | type Msg 101 | = StoreURL String 102 | | FetchData 103 | | FetchSucceed (List Item) 104 | | FetchFail Http.Error 105 | 106 | 107 | update : Msg -> Model -> (Model, Cmd Msg) 108 | update action model = 109 | case action of 110 | StoreURL url -> 111 | ({ model | url = url }, Cmd.none) 112 | 113 | FetchData -> 114 | (model, makeRequest model.url) 115 | 116 | FetchSucceed results -> 117 | ({ model | result = results, error = False }, Cmd.none) 118 | 119 | FetchFail _ -> 120 | ({ model | error = True }, Cmd.none) 121 | 122 | 123 | -- VIEW 124 | 125 | 126 | renderError : Html Msg 127 | renderError = 128 | p [] [ text "There was an error" ] 129 | 130 | 131 | renderResult : Item -> Html Msg 132 | renderResult item = 133 | li [] [ text ( "Item " ++ (toString item.id) ++ ": " ++ item.name) ] 134 | 135 | 136 | renderResults : Model -> Html Msg 137 | renderResults model = 138 | ul [] (List.map renderResult model.result) 139 | 140 | 141 | view : Model -> Html Msg 142 | view model = 143 | let 144 | response = 145 | if model.error == True 146 | then renderError 147 | else renderResults model 148 | in 149 | div [] 150 | [ h1 [] [ text "Nested list"] 151 | , p [] [ text "Here I want to each object nested inside of 'data'"] 152 | , p [] [ text "Demo URL: https://api.myjson.com/bins/1mny6"] 153 | , input [ 154 | placeholder "Enter a URL", 155 | onInput StoreURL 156 | ] [] 157 | , button [ onClick FetchData ] [ text "Fetch!" ] 158 | , response 159 | , div [] [ text (toString model) ] 160 | ] 161 | 162 | 163 | -- SUBSCRIPTIONS 164 | 165 | 166 | subscriptions : Model -> Sub Msg 167 | subscriptions model = 168 | Sub.none 169 | 170 | 171 | -- HTTP 172 | 173 | 174 | makeRequest : String -> Cmd Msg 175 | makeRequest url = 176 | Task.perform FetchFail FetchSucceed (Http.get decoder url) 177 | 178 | 179 | -- decoder 180 | -- decode the contents of 'data' with nestedListDecoder 181 | 182 | decoder: Json.Decoder (List Item) 183 | decoder = 184 | Json.at ["data"] (Json.list nestedListDecoder) 185 | 186 | 187 | -- nestedListDecoder 188 | -- get the name and id from each object 189 | 190 | nestedListDecoder : Json.Decoder Item 191 | nestedListDecoder = 192 | Json.object2 Item 193 | ("name" := Json.string) 194 | ("id" := Json.int) 195 | -------------------------------------------------------------------------------- /DecodeNestedObject.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (..) 2 | import Html.App as Html 3 | import Html.Attributes exposing (..) 4 | import Html.Events exposing (..) 5 | import Http 6 | import Json.Decode as Json exposing ((:=)) 7 | import Task 8 | 9 | -- https://api.myjson.com/bins/yws2 10 | 11 | -- { 12 | -- "title": "This is an amazing title", 13 | -- "data": [ 14 | -- { 15 | -- "id": 1, 16 | -- "name": "foo" 17 | -- }, 18 | -- { 19 | -- "id": 2, 20 | -- "name": "bar" 21 | -- }, 22 | -- { 23 | -- "id": 3, 24 | -- "name": "baz" 25 | -- } 26 | -- ], 27 | -- "obj": { 28 | -- "title": "I'm a nested object" 29 | -- }, 30 | -- "members": [ 31 | -- { 32 | -- "id": 4, 33 | -- "name": "garply", 34 | -- "profile": { 35 | -- "avatar": "some_path_to_garply" 36 | -- } 37 | -- }, 38 | -- { 39 | -- "id": 5, 40 | -- "name": "waldo", 41 | -- "profile": { 42 | -- "avatar": "some_path_to_waldo" 43 | -- } 44 | -- }, 45 | -- { 46 | -- "id": 6, 47 | -- "name": "fred", 48 | -- "profile": { 49 | -- "avatar": "some_path_to_fred" 50 | -- } 51 | -- } 52 | -- ] 53 | -- } 54 | 55 | main = 56 | Html.program 57 | { init = init 58 | , view = view 59 | , update = update 60 | , subscriptions = subscriptions 61 | } 62 | 63 | 64 | -- MODEL 65 | 66 | 67 | type alias Model = 68 | { url : String 69 | , result : String 70 | , error : Bool 71 | } 72 | 73 | initialModel : Model 74 | initialModel = { 75 | url = "" 76 | , result = "" 77 | , error = False 78 | } 79 | 80 | 81 | init : (Model, Cmd Msg) 82 | init = 83 | (initialModel, Cmd.none) 84 | 85 | 86 | -- UPDATE 87 | 88 | 89 | type Msg 90 | = StoreURL String 91 | | FetchData 92 | | FetchSucceed String 93 | | FetchFail Http.Error 94 | 95 | 96 | update : Msg -> Model -> (Model, Cmd Msg) 97 | update action model = 98 | case action of 99 | StoreURL url -> 100 | ({ model | url = url }, Cmd.none) 101 | 102 | FetchData -> 103 | (model, makeRequest model.url) 104 | 105 | FetchSucceed str -> 106 | ({ model | result = str, error = False }, Cmd.none) 107 | 108 | FetchFail _ -> 109 | ({ model | error = True }, Cmd.none) 110 | 111 | 112 | -- VIEW 113 | 114 | 115 | view : Model -> Html Msg 116 | view model = 117 | let 118 | response = 119 | if model.error == True 120 | then "There was an error" 121 | else if model.result /= "" 122 | then "I just found: " ++ model.result 123 | else "" 124 | in 125 | div [] 126 | [ h1 [] [ text "Nested object"] 127 | , p [] [ text "Here I want to grab the nested 'title' from 'obj'"] 128 | , p [] [ text "Demo URL: https://api.myjson.com/bins/1mny6"] 129 | , input [ 130 | placeholder "Enter a URL", 131 | onInput StoreURL 132 | ] [] 133 | , button [ onClick FetchData ] [ text "Fetch!" ] 134 | , p [] [ text response ] 135 | , div [] [ text (toString model) ] 136 | ] 137 | 138 | 139 | -- SUBSCRIPTIONS 140 | 141 | 142 | subscriptions : Model -> Sub Msg 143 | subscriptions model = 144 | Sub.none 145 | 146 | 147 | -- HTTP 148 | 149 | 150 | makeRequest : String -> Cmd Msg 151 | makeRequest url = 152 | Task.perform FetchFail FetchSucceed (Http.get decodeNestedObject url) 153 | 154 | -- decodeNestedObject 155 | -- return at the value from 'obj' > 'title' 156 | 157 | decodeNestedObject : Json.Decoder String 158 | decodeNestedObject = 159 | Json.at ["obj", "title"] Json.string 160 | -------------------------------------------------------------------------------- /DecodeOddlyShapedObject.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (..) 2 | import Html.App as Html 3 | import Html.Attributes exposing (..) 4 | import Html.Events exposing (..) 5 | import Http 6 | import Json.Decode as Json exposing ((:=)) 7 | import Task 8 | 9 | -- https://api.myjson.com/bins/yws2 10 | 11 | -- { 12 | -- "title": "This is an amazing title", 13 | -- "data": [ 14 | -- { 15 | -- "id": 1, 16 | -- "name": "foo" 17 | -- }, 18 | -- { 19 | -- "id": 2, 20 | -- "name": "bar" 21 | -- }, 22 | -- { 23 | -- "id": 3, 24 | -- "name": "baz" 25 | -- } 26 | -- ], 27 | -- "obj": { 28 | -- "title": "I'm a nested object" 29 | -- }, 30 | -- "members": [ 31 | -- { 32 | -- "id": 4, 33 | -- "name": "garply", 34 | -- "profile": { 35 | -- "avatar": "some_path_to_garply" 36 | -- } 37 | -- }, 38 | -- { 39 | -- "id": 5, 40 | -- "name": "waldo", 41 | -- "profile": { 42 | -- "avatar": "some_path_to_waldo" 43 | -- } 44 | -- }, 45 | -- { 46 | -- "id": 6, 47 | -- "name": "fred", 48 | -- "profile": { 49 | -- "avatar": "some_path_to_fred" 50 | -- } 51 | -- } 52 | -- ] 53 | -- } 54 | 55 | main = 56 | Html.program 57 | { init = init 58 | , view = view 59 | , update = update 60 | , subscriptions = subscriptions 61 | } 62 | 63 | 64 | -- MODEL 65 | 66 | 67 | type alias User = 68 | { id: Int 69 | , name: String 70 | , avatar: String 71 | } 72 | 73 | 74 | type alias Model = 75 | { url : String 76 | , result : List User 77 | , error : Bool 78 | , message : String 79 | } 80 | 81 | 82 | initialModel : Model 83 | initialModel = { 84 | url = "" 85 | , result = [] 86 | , error = False 87 | , message = "" 88 | } 89 | 90 | 91 | init : (Model, Cmd Msg) 92 | init = 93 | (initialModel, Cmd.none) 94 | 95 | 96 | -- UPDATE 97 | 98 | 99 | type Msg 100 | = StoreURL String 101 | | FetchData 102 | | FetchSucceed (List User) 103 | | FetchFail Http.Error 104 | 105 | 106 | update : Msg -> Model -> (Model, Cmd Msg) 107 | update action model = 108 | case action of 109 | StoreURL url -> 110 | ({ model | url = url }, Cmd.none) 111 | 112 | FetchData -> 113 | (model, makeRequest model.url) 114 | 115 | FetchSucceed members -> 116 | ({ model | result = members, error = False }, Cmd.none) 117 | 118 | FetchFail err -> 119 | ({ model | error = True, message = toString err }, Cmd.none) 120 | 121 | 122 | -- VIEW 123 | 124 | renderMember members = 125 | ul [] (List.map (\member -> 126 | li [] [ 127 | text (toString(member.id) ++ ": " ++ member.name ++ " " ++ member.avatar) 128 | ] 129 | ) members) 130 | 131 | view : Model -> Html Msg 132 | view model = 133 | let 134 | response = 135 | if model.error == True 136 | then "There was an error" 137 | else "" 138 | in 139 | div [] 140 | [ h1 [] [ text "Oddly shaped object"] 141 | , p [] [ text "Here I want to grab every member's 'id', 'name' and path to their 'avatar' (nested in 'profile')"] 142 | , p [] [ text "Demo URL: https://api.myjson.com/bins/yws2"] 143 | , input [ 144 | placeholder "Enter a URL", 145 | onInput StoreURL 146 | ] [] 147 | , button [ onClick FetchData ] [ text "Fetch!" ] 148 | , p [] [ text response ] 149 | , renderMember model.result 150 | , div [] [ text (toString model) ] 151 | ] 152 | 153 | 154 | -- SUBSCRIPTIONS 155 | 156 | 157 | subscriptions : Model -> Sub Msg 158 | subscriptions model = 159 | Sub.none 160 | 161 | 162 | -- HTTP 163 | 164 | 165 | makeRequest : String -> Cmd Msg 166 | makeRequest url = 167 | Task.perform FetchFail FetchSucceed (Http.get decodeMembersResponse url) 168 | 169 | 170 | -- decodeMembersResponse 171 | -- pluck out the members list from the makeRequest response 172 | -- decode response with decodeMembers 173 | 174 | decodeMembersResponse: Json.Decoder (List User) 175 | decodeMembersResponse = 176 | Json.at ["members"] (Json.list decodeMembers) 177 | 178 | 179 | -- decodeMembers 180 | -- pluck out the id, name, name and avatar for each member 181 | 182 | decodeMembers : Json.Decoder User 183 | decodeMembers = 184 | Json.object3 User 185 | ("id" := Json.int) 186 | ("name" := Json.string) 187 | ("profile" := decodeAvatar) 188 | 189 | 190 | -- decodeAvatar 191 | -- pluck the avatar from profile 192 | 193 | decodeAvatar : Json.Decoder String 194 | decodeAvatar = 195 | Json.at ["avatar"] Json.string 196 | -------------------------------------------------------------------------------- /DecodeSimpleString.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (..) 2 | import Html.App as Html 3 | import Html.Attributes exposing (..) 4 | import Html.Events exposing (..) 5 | import Http 6 | import Json.Decode as Json exposing ((:=)) 7 | import Task 8 | 9 | -- https://api.myjson.com/bins/yws2 10 | 11 | -- { 12 | -- "title": "This is an amazing title", 13 | -- "data": [ 14 | -- { 15 | -- "id": 1, 16 | -- "name": "foo" 17 | -- }, 18 | -- { 19 | -- "id": 2, 20 | -- "name": "bar" 21 | -- }, 22 | -- { 23 | -- "id": 3, 24 | -- "name": "baz" 25 | -- } 26 | -- ], 27 | -- "obj": { 28 | -- "title": "I'm a nested object" 29 | -- }, 30 | -- "members": [ 31 | -- { 32 | -- "id": 4, 33 | -- "name": "garply", 34 | -- "profile": { 35 | -- "avatar": "some_path_to_garply" 36 | -- } 37 | -- }, 38 | -- { 39 | -- "id": 5, 40 | -- "name": "waldo", 41 | -- "profile": { 42 | -- "avatar": "some_path_to_waldo" 43 | -- } 44 | -- }, 45 | -- { 46 | -- "id": 6, 47 | -- "name": "fred", 48 | -- "profile": { 49 | -- "avatar": "some_path_to_fred" 50 | -- } 51 | -- } 52 | -- ] 53 | -- } 54 | 55 | main = 56 | Html.program 57 | { init = init 58 | , view = view 59 | , update = update 60 | , subscriptions = subscriptions 61 | } 62 | 63 | 64 | -- MODEL 65 | 66 | 67 | type alias Model = 68 | { url : String 69 | , result : String 70 | , error : Bool 71 | } 72 | 73 | 74 | initialModel : Model 75 | initialModel = { 76 | url = "" 77 | , result = "" 78 | , error = False 79 | } 80 | 81 | 82 | init : (Model, Cmd Msg) 83 | init = 84 | (initialModel, Cmd.none) 85 | 86 | 87 | -- UPDATE 88 | 89 | 90 | type Msg 91 | = StoreURL String 92 | | FetchData 93 | | FetchSucceed String 94 | | FetchFail Http.Error 95 | 96 | 97 | update : Msg -> Model -> (Model, Cmd Msg) 98 | update action model = 99 | case action of 100 | StoreURL url -> 101 | ({ model | url = url }, Cmd.none) 102 | 103 | FetchData -> 104 | (model, makeRequest model.url) 105 | 106 | FetchSucceed str -> 107 | ({ model | result = str, error = False }, Cmd.none) 108 | 109 | FetchFail _ -> 110 | ({ model | error = True }, Cmd.none) 111 | 112 | 113 | -- VIEW 114 | 115 | 116 | view : Model -> Html Msg 117 | view model = 118 | let 119 | response = 120 | if model.error == True 121 | then "There was an error" 122 | else if model.result /= "" 123 | then "I just found: " ++ model.result 124 | else "" 125 | in 126 | div [] 127 | [ h1 [] [ text "Simple string"] 128 | , p [] [ text "Here I want to grab the 'title'"] 129 | , p [] [ text "Demo URL: https://api.myjson.com/bins/1mny6"] 130 | , input [ 131 | placeholder "Enter a URL", 132 | onInput StoreURL 133 | ] [] 134 | , button [ onClick FetchData ] [ text "Fetch!" ] 135 | , p [] [ text response ] 136 | , div [] [ text (toString model) ] 137 | ] 138 | 139 | 140 | -- SUBSCRIPTIONS 141 | 142 | 143 | subscriptions : Model -> Sub Msg 144 | subscriptions model = 145 | Sub.none 146 | 147 | 148 | -- HTTP 149 | 150 | 151 | makeRequest : String -> Cmd Msg 152 | makeRequest url = 153 | Task.perform FetchFail FetchSucceed (Http.get decodeTitle url) 154 | 155 | 156 | -- decodeTitle 157 | -- return the string from 'title' 158 | 159 | decodeTitle : Json.Decoder String 160 | decodeTitle = 161 | Json.at ["title"] Json.string 162 | -------------------------------------------------------------------------------- /HandleHttpError.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (..) 2 | import Html.App as Html 3 | import Html.Attributes exposing (..) 4 | import Html.Events exposing (..) 5 | import Http 6 | import Json.Decode as Json exposing ((:=)) 7 | import Task 8 | 9 | 10 | main = 11 | Html.program 12 | { init = init 13 | , view = view 14 | , update = update 15 | , subscriptions = subscriptions 16 | } 17 | 18 | 19 | -- MODEL 20 | 21 | 22 | type alias Model = 23 | { url : String 24 | , result : String 25 | , error : Maybe String 26 | } 27 | 28 | 29 | initialModel : Model 30 | initialModel = { 31 | url = "" 32 | , result = "" 33 | , error = Nothing 34 | } 35 | 36 | 37 | init : (Model, Cmd Msg) 38 | init = 39 | (initialModel, Cmd.none) 40 | 41 | 42 | -- UPDATE 43 | 44 | 45 | type Msg 46 | = StoreURL String 47 | | FetchTitle 48 | | FetchSucceed String 49 | | FetchFail Http.Error 50 | 51 | 52 | update : Msg -> Model -> (Model, Cmd Msg) 53 | update action model = 54 | case action of 55 | StoreURL url -> 56 | ({ model | url = url }, Cmd.none) 57 | 58 | FetchTitle -> 59 | (model, makeRequest model.url) 60 | 61 | FetchSucceed str -> 62 | ({ model | result = str }, Cmd.none) 63 | 64 | -- handle Http.Error 65 | -- http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#Error 66 | FetchFail err -> 67 | case err of 68 | Http.Timeout -> 69 | ({ model | error = Just "Timeout" }, Cmd.none) 70 | 71 | Http.NetworkError -> 72 | ({ model | error = Just "Network Error" }, Cmd.none) 73 | 74 | Http.UnexpectedPayload error -> 75 | ({ model | error = Just error }, Cmd.none) 76 | 77 | Http.BadResponse code error -> 78 | ({ model | error = Just error }, Cmd.none) 79 | 80 | 81 | -- VIEW 82 | 83 | 84 | view : Model -> Html Msg 85 | view model = 86 | div [] 87 | [ h1 [] [ text "Http Error"] 88 | , p [] [ text "Enter any random string"] 89 | , input [ 90 | placeholder "Enter a URL", 91 | onInput StoreURL 92 | ] [] 93 | , button [ onClick FetchTitle ] [ text "Fetch!" ] 94 | , p [] [ text (Maybe.withDefault "" model.error) ] 95 | , div [] [ text (toString model) ] 96 | ] 97 | 98 | 99 | -- SUBSCRIPTIONS 100 | 101 | 102 | subscriptions : Model -> Sub Msg 103 | subscriptions model = 104 | Sub.none 105 | 106 | 107 | -- HTTP 108 | 109 | 110 | makeRequest : String -> Cmd Msg 111 | makeRequest url = 112 | Task.perform FetchFail FetchSucceed (Http.get decodeTitle url) 113 | 114 | 115 | -- decodeTitle 116 | -- return the string from 'title' 117 | 118 | decodeTitle : Json.Decoder String 119 | decodeTitle = 120 | Json.at ["title"] Json.string 121 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Elm Simple JSON Decoding 2 | 3 | A playground for decoding a JSON object in [elm](http://elm-lang.org/). 4 | 5 | One thing that threw me with decoding a JSON response was that you _have to know_ what the response is before you can decode it. 6 | 7 | To my knowledge, unlike JavaScript you can't seem to blurt out the complete response of a Http request to a console or whatever - and then decide what parts you need. 8 | 9 | It's no biggie. If you're unsure of the structure of your response, try using something like [Postman](https://www.getpostman.com/ "Postman") or [Paw](https://luckymarmot.com/paw "Paw"). 10 | 11 | The following examples are using the same endpoint yet decoding different levels of data in the responses. I've also included an example on handling a Http.Error. 12 | 13 | * [Simple string](http://chrisbuttery.github.io/elm-simple-json-decoding/simple_string.html) 14 | * [Nested object](http://chrisbuttery.github.io/elm-simple-json-decoding/nested_object.html) 15 | * [Nested list](http://chrisbuttery.github.io/elm-simple-json-decoding/nested_list.html) 16 | * [Oddly shaped object](http://chrisbuttery.github.io/elm-simple-json-decoding/oddly_shaped_object.html) 17 | * [Handle Http Error](http://chrisbuttery.github.io/elm-simple-json-decoding/http_error.html) 18 | 19 | ### Response 20 | 21 | [https://api.myjson.com/bins/yws2](https://api.myjson.com/bins/yws2) 22 | 23 | ```js 24 | { 25 | "title": "This is an amazing title", 26 | "data": [ 27 | { 28 | "id": 1, 29 | "name": "foo" 30 | }, 31 | { 32 | "id": 2, 33 | "name": "bar" 34 | }, 35 | { 36 | "id": 3, 37 | "name": "baz" 38 | } 39 | ], 40 | "obj": { 41 | "title": "I'm a nested object" 42 | }, 43 | "members": [ 44 | { 45 | "id": 4, 46 | "name": "garply", 47 | "profile": { 48 | "avatar": "some_path_to_garply" 49 | } 50 | }, 51 | { 52 | "id": 5, 53 | "name": "waldo", 54 | "profile": { 55 | "avatar": "some_path_to_waldo" 56 | } 57 | }, 58 | { 59 | "id": 6, 60 | "name": "fred", 61 | "profile": { 62 | "avatar": "some_path_to_fred" 63 | } 64 | } 65 | ] 66 | } 67 | ``` 68 | 69 | > [chrisbuttery.com](http://chrisbuttery.com)  ·  70 | > GitHub [@chrisbuttery](https://github.com/chrisbuttery)  ·  71 | > Twitter [@buttahz](https://twitter.com/buttahz)  ·  72 | > elm-lang slack [@butters](http://elmlang.herokuapp.com/) 73 | -------------------------------------------------------------------------------- /elm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0", 3 | "summary": "A playground of basic examples decoding a JSON object", 4 | "repository": "https://github.com/user/project.git", 5 | "license": "BSD3", 6 | "source-directories": [ 7 | "." 8 | ], 9 | "exposed-modules": [], 10 | "dependencies": { 11 | "elm-lang/core": "4.0.1 <= v < 5.0.0", 12 | "elm-lang/html": "1.0.0 <= v < 2.0.0", 13 | "evancz/elm-http": "3.0.1 <= v < 4.0.0" 14 | }, 15 | "elm-version": "0.17.0 <= v < 0.18.0" 16 | } 17 | --------------------------------------------------------------------------------