Skip to content

Prople with json string #41

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

Closed
lwf804 opened this issue Feb 15, 2019 · 2 comments
Closed

Prople with json string #41

lwf804 opened this issue Feb 15, 2019 · 2 comments

Comments

@lwf804
Copy link

lwf804 commented Feb 15, 2019

I parse object to string and save it to db.
But when I parse the string to object, it get error.

Example:
I save ["abc"] => '["abc"]', sqlstring format to '["abc"]'.
When I get from db again and json parse to object get a error:

VM47:1 Uncaught SyntaxError: Unexpected token \ in JSON at position 1
    at JSON.parse (<anonymous>)
    at <anonymous>:1:6
@dougwilson
Copy link
Member

Hi @lwf804 sorry you're having issues. I'm not really understanding the report, though. Can you show the JavaScript you're using (the call to this library)?

@lwf804
Copy link
Author

lwf804 commented Apr 17, 2019

Sorry, i use sqlstring with db2 to escape input value. But db2 escape rule is diff with mysql. I will close this issue!

@lwf804 lwf804 closed this as completed Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants