-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Parse arrays: json[], uuid[] #456
Conversation
Awesome, thanks. |
Guys, I have a {"{\"url\": \"https://example.com/photo1.jpg\"}","{\"url\": \"https://example.com/photo2.jpg\"}"} As you can see, it is still in Postgres specific format. Should the conversion to a conventional JSON array (e.g. [{...},{...}] be handled by the |
I think it should probably convert to a json structure, but I'm not sure On Wed, Feb 25, 2015 at 1:52 AM, Dmitri Moore notifications@github.com
|
Thank you for the prompt response. I believe this issue applies to both, JSON[ ] and JSONB[ ] array parsing. I am not aware of any good libraries for this and googling didn't reveal much besides just some Ruby and C libs like this one: https://code.google.com/p/pg-to-json-serializer/. Not sure if I was looking for the right stuff, though, since this is not yet my area of expertise. Shall I create a new issue to track this effort? |
There's no issue with parsing jsonb with Opened brianc/node-pg-types#21 |
@bendrucker You are correct. I don't see any issues with parsing if I define the column as |
If you want a good blog post from the guy who reviewed jsonb, check this out: http://pgeoghegan.blogspot.com/2014/03/what-i-think-of-jsonb.html |
I've added parsing of two additional types json[] and uuid[]. I'll be happy if you could merge it.