Hello,
I am trying to serialize following javascript object
{
key with " double quote: "value"
}
with $wnd.isc.JSON.encode(object) (I am using smartgwt but this is actually issue in smartclient)
actual result is INVALID json string.
{
'key with " double quote': "value"
}
According json.org only double quotes are allowed to wrap a key. You are using apostrophe instead.
Actually I have looked to smartclient sources (Serialize.js) you provide and I have found out you have a special case for such keys with quotes and it is resolved with apostrophes.
So it is feature or bug ?
If feature, what other smart-client api I should use ? My goal is to serialize object to string. This string is then processed by backend, that cries that incomming json string is invalid.
Thanks in advance
I am using smart client v110p_2016-04-27_LGPL
I am trying to serialize following javascript object
{
key with " double quote: "value"
}
with $wnd.isc.JSON.encode(object) (I am using smartgwt but this is actually issue in smartclient)
actual result is INVALID json string.
{
'key with " double quote': "value"
}
According json.org only double quotes are allowed to wrap a key. You are using apostrophe instead.
Actually I have looked to smartclient sources (Serialize.js) you provide and I have found out you have a special case for such keys with quotes and it is resolved with apostrophes.
So it is feature or bug ?
If feature, what other smart-client api I should use ? My goal is to serialize object to string. This string is then processed by backend, that cries that incomming json string is invalid.
Thanks in advance
I am using smart client v110p_2016-04-27_LGPL
Comment