-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated code to purescript 0.12 and Generic.Rep #15
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this special case no longer needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)Aff
affjax
(called itajax
here) 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 needgetResult
any more - I think it's the obvious use case hereencodeUriComponent
andunsafeToString
- 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-purescript
and I wanted to have your input/feedback on thatbest regards,
Carsten