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.
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.