Closed xiutxu closed 8 years ago
Should I be using json
for questions which pertain to Spock?
@sqd I tried for a little while to use json
, but I couldn't figure out how make
[{"name":"tesla","id":"7781ee7e-1e43-4608-bb96-fe10cac3b53a"}]
the desired datatype. I will need to look at https://hackage.haskell.org/package/aeson-0.10.0.0/docs/Data-Aeson-Types.html#t:ToJSON a little more closely. Here's the full problem if anyone cares :) https://mail.haskell.org/pipermail/beginners/2016-August/017050.html
@xiutxu What do you mean by "questions which pertain to Spock"?
If you just want a quick and dirty type-unsafe JSON conversion, you could use toJSON [object ["name" .= "tesla", "id" .= "..."]]
@sqd, I have a feeling I will run into many things which I want to discuss when starting to use Spock. I don't mind placing my queries here,but I understand this may not be the place for it.
You could use the mailing list at haskell-spock@googlegroups.com
Instead of sending back a text response, how can I send back a json response?