Closed ridgeworks closed 5 years ago
SWI-Prolog V8.1.1 Not sure what the end result is but is the clause for pengines:output_result handling JSON replies missing brackets in ->:
pengines:output_result
->
output_result(Lang, Event, _) :- json_lang(Lang), !, ( event_term_to_json_data(Event, JSON, Lang) -> cors_enable, disable_client_cache, reply_json(JSON) ; assertion(event_term_to_json_data(Event, _, Lang)) ).
i.e., you only want to reply_json(JSON) if event_term_to_json_data/3 succeeds.
reply_json(JSON)
event_term_to_json_data/3
I'm closing this issue. Think I'm just confused about semantics of C->T1,T2;E.
C->T1,T2;E
SWI-Prolog V8.1.1 Not sure what the end result is but is the clause for
pengines:output_result
handling JSON replies missing brackets in->
:i.e., you only want to
reply_json(JSON)
ifevent_term_to_json_data/3
succeeds.