xowiki::Page instproc www-json (public)
<instance of xowiki::Page> www-json
Defined in /var/www/openacs/packages/xowiki/tcl/json-procs.tcl
Send the content object's attributes as pretty-printed JSON. Access is restricted to site-wide administrators by the package policy. Return HTTP 501 when ns_json is unavailable, then abort request processing.
- Testcases:
- No testcase defined.
Source code: if {![::acs::icanuse "ns_json"]} { ns_return 501 text/plain "JSON export requires ns_json support" ad_script_abort } ns_set put [ns_conn outputheaders] Cache-Control no-store ns_return 200 application/json [:as_json -pretty true] ad_script_abortXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)