Created
July 31, 2016 08:46
-
-
Save anonymous/14695f7fb2086832f9c6ec56ea54597f to your computer and use it in GitHub Desktop.
JSON Decoder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"typeID":35, | |
"regionID":10000011, | |
"orders":[ | |
{ | |
"volRemaining":95050881, | |
"volEntered":100000000, | |
"range":32767, | |
"price":3.03, | |
"orderID":4498911653, | |
"minVolume":1, | |
"issueDate":"2016-05-08T14:31:57+00:00", | |
"duration":90, | |
"bid":true | |
}, | |
{ | |
"volRemaining":8953112, | |
"volEntered":8953112, | |
"range":32767, | |
"price":10, | |
"orderID":4588933128, | |
"minVolume":1, | |
"issueDate":"2016-07-11T15:30:37+00:00", | |
"duration":90, | |
"bid":false | |
}, | |
{ | |
"volRemaining":19797893, | |
"volEntered":20000000, | |
"range":0, | |
"price":7.99, | |
"orderID":4594602006, | |
"minVolume":1, | |
"issueDate":"2016-07-20T04:04:42+00:00", | |
"duration":90, | |
"bid":true | |
} | |
], | |
"generatedAt":"2016-07-30T13:52:20+00:00" | |
}, | |
... | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Parse above JSON as List Order | |
type alias Order = | |
{ typeID : Int | |
, regionID : Int | |
, generatedAt : String | |
, volRemaining : Int | |
, volEntered : Int | |
, range : Int | |
, price : Float | |
, orderID : Int | |
, minVolume : Int | |
, issueDate : String | |
, duration : Int | |
, bid : Bool | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment