xo::REST method with_json_result (protected)

 <instance of xo::REST[i]> with_json_result rvar

Defined in packages/xooauth/tcl/rest-procs.tcl

Parameters:
rvar

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
:upvar $rvar r
set content_type [ns_set iget [dict get $r headers] content-type ""]
if {[string match "application/json*" $content_type]} {
    dict set r JSON  [:json_to_dict [dict get $r body]]
}
return $r
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: