Skip to content
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

MSSQL 2017 with JSON feature add "JSON_F52E2B61-18A1-11d1-B105-00805F49916B" prefix to JSON resultset #20

Closed
timnis opened this issue Dec 20, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@timnis
Copy link

timnis commented Dec 20, 2019

Hi,

I try use this node with MSSQL 2017 and JSON feature. Problem is that MSSQL add MS specific prefix to JSON result. Like below. String is always same.

"JSON_F52E2B61-18A1-11d1-B105-00805F49916B": "{\"ProductCode\":\"0040001\",\"ProductName\":\"Brother DK11209 osoitetarra 29x62mm\"}"

It changes JSON to JavaScript Objects says Nick O'Leary, see thread
https://discourse.nodered.org/t/http-response-json-without-backslashes/19376/7?u=timnis

In node-mssql there is option "config.parseJSON = true" to strip out this MS prefix, could it be also possible to add to this node?

More info
https://tediousjs.github.io/node-mssql/#json-support

@timnis
Copy link
Author

timnis commented Dec 20, 2019

I tested to add "parseJSON: true," to mssql.js config and now JSON result is correct

[{"ProductCode":"0040001","ProductName":"Brother DK11209 osoitetarra 29x62mm"}]

So it works, at least to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants