- reply_json(+JSONTerm) is det
- reply_json(+JSONTerm, +Options) is det
- Formulate a JSON HTTP reply. See json_write/2 for details.
The processed options are listed below. Remaining options are
forwarded to json_write/3.
- The default
charset=UTF8 should not be required
because JSON is defined to be UTF-8 encoded, but some
clients insist on it.
- The default status is 200. REST API functions may use
other values from the 2XX range, such as 201 (created).
- One of
term (classical json representation) or
to use the new dict representation. If omitted and Term
is a dict,
dict is assumed. SWI-Prolog Version 7.