...
About how to use patterns in flexjson, refer to http://flexjson.sourceforge.net/ and the javadoc of JSONSerializer
...
Parameter name | Default value | Description | ||
---|---|---|---|---|
target | null | the bean to be serialized, if set to null, the action itself will be serialized. | ||
patterns | null | Fully support the patterns that can be applied to flexjson. See the above section about "Patterns" | ||
prettyPrint | false | whether to format the result json string | ||
rootName | null | if set, it will wrap the resulting JSON in a javascript object that contains a single field named rootName. | ||
deepSerialize | false | whether to deep serialize the object, by default flexjson will not serialize the collections in a bean | ||
out.contentType | application/json | http reponse content type | ||
out.statusCode | 200 | http status code of the response, sometimes 500 maybe used to indicate an exception | ||
out.characterEncoding | utf-8 | http response character encoding | ||
out.gzip | false | whether to use gzip to compress the response, to reduce the network transfer load | ||
out.noCache | false | when set to true, the following 3 headers will be set. Cache-Control set to no-cache, Expires set to 0 and Pragma set to No-cache | ||
prefix | false | when set to true, a prefix "{}&&" would be added before the json result, this is to prevent json attack, see this blog for the detail | ||
callbackParameter | null | when set, the result will be wrapped with a function. The function name is speicified by this callbackParameter. For example: when callbackParameter is set to callback, http://localhost:9080/spiderx/test/test?callback=alert![]() will generate a result like
|
...