From d05b926dc2971552edca2ad510fb7437698c4aad Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 9 Feb 2018 13:39:22 +0100 Subject: vppapigen: simplify JSON format for services Use "services": { "foo_request": { "reply": "foo_request_reply" }, "foo_dump": { "reply": "foo_details", "stream": true } }, instead of: "services": [ { "foo_request": { "reply": "foo_request_reply" } }, { "foo_dump": { "reply": "foo_details", "stream": true } } ], Change-Id: I1d8e6bb4d41541b7f7f63242935f2ed4467fc52b Signed-off-by: Marek Gradzki --- src/tools/vppapigen/JSON.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/vppapigen/JSON.py b/src/tools/vppapigen/JSON.py index d1f47ebc560..73bff76cbb7 100644 --- a/src/tools/vppapigen/JSON.py +++ b/src/tools/vppapigen/JSON.py @@ -15,14 +15,14 @@ def walk_enums(s): def walk_services(s): - r = [] + r = {} for e in s: d = {'reply': e.reply} if e.stream: d['stream'] = True if e.events: d['events'] = e.events - r.append({e.caller: d}) + r[e.caller] = d return r -- cgit 1.2.3-korg