-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
If the first character of a value is a quote (i.e., Char ( 34 )), JSON.Merge treats the value as JSONRaw, which alters the value.
For instance, given take this valid JSON value: ""Full Name" email@domain.com"
JSON.Merge lets FileMaker decide it's type, which results in data loss:
Let ( foo = Quote ( "First Last" ) & "<name@domain.com>" ;
JSONSetElement ( "{}" ; "bar" ; foo ; "" )
) = {"bar":"First Last"}
We need to make sure to cast it as a JSONString:
Let ( foo = Quote ( "First Last" ) & "<name@domain.com>" ;
JSONSetElement ( "{}" ; "bar" ; foo ; JSONString )
) = {"bar":"\"First Last\"<name@domain.com>"}
We need to include a check for at least Char (34) when deciding to explicitly cast the JSONSetElement as a JSONString, and possibly other values as well.
Stay tuned for the file that includes the test and fix.
Reactions are currently unavailable