Cloud Code parameter value requires JSON escaping #9508
Labels
bounty:$20
Bounty applies for fixing this issue (Parse Bounty Program)
type:bug
Impaired feature or lacking behavior that is likely assumed
New Issue Checklist
Issue Description
When storing a string
\
in Cloud Code:String
, the string is retrieved in Cloud Code as is.Object
orArray
the value cannot be saved unless the character is escaped ({ "v":
\}
or["\\"]
) so that the string is retrieved in Cloud Code as\
.This is likely due to the JSON stringification of objects and arrays, which is not applied to simple strings. This becomes an issue when modifying values which requires manual transformation from escaped to unescaped and vice-versa. This is prone to user errors due to the special handling that has to be considered.
Steps to reproduce
Actual Outcome
Values for Object and Array require escaping.
Expected Outcome
Values for Object and Array don't require escaping and any necessary escaping is handled by Parse Server in the background.
Environment
Server
7.4.0
The text was updated successfully, but these errors were encountered: