Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.3.1
-
Component/s: None
-
Labels:None
Description
Using JQuery on the browser side in conjunction with GET or POST operations, the root var name is typlically 'data'. If you serialized a simpl String through XStream with the JSON driver, you'd be given { string : "foo " } or similar.
In the JavaScript in the browser, you'd address that as ...
alert( data.string );
It would be nice to address it simply as ...
alert(data);
Can we have a switch on the Json Driver : noRootNode(true); ?
Issue Links
| This issue duplicates: | ||||
| XSTR-434 | Strip root node generated JSON |
|
|
|
Neither
nor
{ "value" }is valid JSON.
The current JSON driver already has this no root flag (see
XSTR-434), but will throw a ConversionException for a single value.{ "value" }XSTR-434), but will throw a ConversionException for a single value.