From ef333ee770f743a4ffcbe8f571acca40a96d5d1a Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 1 Oct 2016 22:33:18 +0200 Subject: [PATCH] add json_object function with type_name of the object. Hence that function will automatically add a json member with name "obj_type". This function help to find the right object in the json tree --- web/CXM_json.anubis | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/web/CXM_json.anubis b/web/CXM_json.anubis index ee407e1..06d4a07 100644 --- a/web/CXM_json.anubis +++ b/web/CXM_json.anubis @@ -45,6 +45,14 @@ public define Printable_tree //------------------------------- // helpers +public define JsonValue + json_object + ( + String type_name, + List(JsonMember) members + )= + json_object([json_member("obj_type", json_string(type_name)) . members]). + public define JsonMember json_member ( -- libgit2 0.21.4