-
Notifications
You must be signed in to change notification settings - Fork 139
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
Auto string detect #24
Comments
I tried and tried.. finally a coworker pointed me to this elegant shortcut, but I could not get it to fit in the project (either in
which I mashed down to just:
The issue I was bumping into was that once a string is made a string (stringify to get its quotes), then the next time the user changes that value, the quotes get escaped .. . |
…g for value without quotes and have it be distinguished from other json types and be automatically quoted
Hi,
Adding double quotes and escaping string yourself is a hassle.
Strings should also be auto escaped if needed.
Here is my proposed solution.
(it is a bit dirty and might need some work)
replace parse function with:
Now strings will be escaped and quoted automatically.
If the parameter added is an array object string number or bool it still perceived as such.
Only when it can't parse the data it will assume it is a string that needs formatting and escape it automatically.
The text was updated successfully, but these errors were encountered: