From b4d5518be090125aefb08709343062094240b181 Mon Sep 17 00:00:00 2001 From: Matt Lilley Date: Thu, 18 Apr 2019 13:48:50 +0100 Subject: [PATCH] ADDED: a json:json_write_hook/4 hook to allow for end-user control over objects --- json.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/json.pl b/json.pl index f229a92..bc35484 100644 --- a/json.pl +++ b/json.pl @@ -74,6 +74,9 @@ :- use_foreign_library(foreign(json)). +:- multifile + json_write_hook/4. % +Term, +Stream, +State, +Options + :- predicate_options(json_read/3, 3, [ null(ground), true(ground), @@ -535,6 +538,25 @@ % objects can be safely embedded into an HTML =|