I have a port that will respond with some JSON from a web service (Blockspring). I'm using their custom library, so a REST call won't work.
I've set up the port call, which works fine. But I'm not sure how to set up the port to receive JSON and then turn that into Elm. I've read through the HTTP, JSON, and interop portions of the elm guide, but I can't figure out how to put it all together for this use case.
The JSON looks arbitrarily like this;
It's just a list of objects that have key/value pairs (which are all Strings except for one timestamp)
I also can't figure out the type definition, I've tried a bunch of things.
port response : ??? -> Sub msg
1) What's the correct function signature here?
2) How do I decode that JSON to an Elm type of List Project? Without the decoder function call of Http.get, I am pretty stumped.
Thanks!