-
Notifications
You must be signed in to change notification settings - Fork 32
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
2.3.1 JSON no longer escaped. #157
Comments
Please follow the repository/homepage url of the package, I'm not sure if the new behaviour is a bug, or a bugfix though. It kind of makes sense either way... |
Hi, thanks for your reply. I think it's a bug as the response from any PostGreSQL client is as it was with 2.3.0 and now the output isn't valid JSON any more. I'm a bit new to GitHub so what's the best way to raise this? |
I think the output is now a |
Hi @isoos, thanks so much for coming back to me with a solution - indeed if I update my app to wrap jsonEncode around the result from the query I get a proper JSON object again. :-) In my case I'm using the database to generate JSON I can pass directly to my API. I would say it's not a desirable default behaviour (but useful as an option) as my query above gives a single cell result string but now in 2.3.1 the package is deciding to try and parse it. I can also seem to override it with the following query:
If you decide to keep it as is it looks like you should rename the version 2.3.1 to 3.0.0 as it is a breaking change in line with the Dart Pub versioning: https://semver.org/spec/v2.0.0-rc.1.html |
Hm, two additional things we can consider:
/cc @schultek the author of the given change in case there is more to it. |
Hi,
I just upgraded to 2.3.1 and the following query no longer returns JSON escaped
Before with 2.3.0:
[{"tablekey":1,"tablename":"Collection 1","clientkey":1,"createddate":"2020-02-05T00:00:00","tableID":"5f2134234q2342342324"}]
Now with 2.3.1:
[{tablekey: 1, tablename: Collection 1, clientkey: 1, createddate: 2020-02-05T00:00:00, tableID: 5f2134234q2342342324}]
Have you any ideas if there's something I need to change on my end or is it a bug?
The text was updated successfully, but these errors were encountered: