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

Why string values are always trimmed? My workaround: #12

Open
websystems-dev opened this issue Jul 4, 2021 · 0 comments
Open

Why string values are always trimmed? My workaround: #12

websystems-dev opened this issue Jul 4, 2021 · 0 comments

Comments

@websystems-dev
Copy link

Hi all. When we load data from a string with loadJson() or we are displaying data with JSONoutput(), all processed strings are always trimmed. Is this a wanted behavior?
In my case, no. This was an issue, because my app wants to receive the complete value, even if it begins/ends with spaces.
So I found that aj_JSONEncode() and aj_JSONDecode() always trim strings.
Solution: I made a copy of these 2 functions - dropping the trim() - and I replaced them in getJSONValue() and WriteValue(). Now string values are added/readed without trimming.

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

No branches or pull requests

1 participant