SetForcedResult Viper Example
In this example, the result of the page (in fact, the result of the root-macro) will be set to the content of the JSON object.
Smartsite SXML | Copy Code |
---|---|
This will not be sent to the client... <se:json id="json">{"a":"b"}</se:json> {response.contenttype('application/json')} {page.setforcedresult(page.json.get())} |
Example Result | Copy Code |
---|---|
{"a":"b"} |