gerritvankuipers / aspjson

Classic ASP JSON Class Reading/Writing
78 stars 39 forks source link

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

Open websystems-dev opened 3 years ago

websystems-dev commented 3 years ago

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.