updated code to purescript 0.12 and Generic.Rep#15
updated code to purescript 0.12 and Generic.Rep#15CarstenKoenig wants to merge 1 commit intoeskimor:masterfrom
Conversation
| gDefaultEncodeHeader v = | ||
| case toSpine v of | ||
| SString s -> s -- Special case string - just use it as is (http-api-data compatibility). | ||
| _ -> show <<< Aeson.encodeJson $ v |
There was a problem hiding this comment.
why is this special case no longer needed?
There was a problem hiding this comment.
if I did not mess up this should be taken care of by this instance here:
as far as I understood your code this one was used pass on strings as they are
There was a problem hiding this comment.
haha - yeah I completely missed that one. Looks good then. 'else instance' - that's a nice construct :-P
|
I believe the second is used for error reporting, if I remember correctly. If we get the JSON directly, how do we report errors if something goes wrong? |
|
I should probably write some test cases but I hoped to use this kind of error for those kinds of errors ( |
|
Sounds reasonable. |
|
ok, this one is needed, what is the situation with this, I will test with the servant-purescript PR now |
|
Any updates on the update? :-) |
|
any news? |
ok this includes a lot of (sadly breaking) changes:
purescript-argonaut-generic(right now my own fork - I hope they include this or something similar soon)Affaffjax(called itajaxhere) that is close to your original version but there is one change: it will use argonaut-generic instances to decode the JSON right there - so we don't needgetResultany more - I think it's the obvious use case hereencodeUriComponentandunsafeToString- mostly because I could not find the first any more and I'm not sure what the second is exactly used for at the momentsadly there are no tests and I'm not 100% certain that this code is working
so this is more or less WIP but I need this to continue on
servant-purescriptand I wanted to have your input/feedback on thatbest regards,
Carsten