-
Notifications
You must be signed in to change notification settings - Fork 14
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
Convert BSON to JSON #8
Comments
Hi Sean, thanks for the code. I will look at it in a few weeks. You could create your own package for this if you wanted. A third package on top of json and bson packages is ok. |
you could see what happens if you use deriving Generic https://github.com/bos/aeson/blob/master/examples/Generic.hs |
That is awesome. That's pretty much exactly what I should have done. Thanks
|
Hi Sean, so how did you convert BSON to JSON using Generics? |
I didn't. I just assumed that the above example did it. Does it not work? On Dec 20, 2011, at 4:07 PM, Tony [email protected] wrote:
|
+1 to that. Attempting to get generics working at the moment |
Did anybody get this working? Example? |
Someone has done this with persitent-mongoDB. They have an Aeson -> PersistentValue converter. A PersistValue gets converted into BSON in persitent-mongoDB |
I've gotten good results by writing a conversion from Code here: https://gist.github.com/4092219 |
Hi, I'm new to haskell, so I have no idea whether this kind of code belongs in the BSON repo, the JSON repo, or something else, but I needed a way to serialize BSON to JSON.
https://gist.github.com/1335856
Can you use this? (Note that it's not quite done). If not, where does this kind of mapping between two separate libraries live in haskell-land? BSON and JSON are such close cousins that it seems like it should be easier.
Is there a better way to do this?
Also note that it seems that most of the libraries use Text.Text now instead of CompactString, which made it annoying to convert between the two.
Thanks!
The text was updated successfully, but these errors were encountered: