libxl_json: introduce libxl__object_from_json
authorWei Liu <wei.liu2@citrix.com>
Mon, 9 Jun 2014 12:43:19 +0000 (13:43 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 10 Jun 2014 13:07:31 +0000 (14:07 +0100)
commit185123b72e122708d54451347ebcb6f83988014e
tree4baf6ea776ff35fa981bfacec33d4eced7235f97
parent0382ef6596ad05586df9c721df4c5a3fab4f5567
libxl_json: introduce libxl__object_from_json

Given a JSON string, we need to convert it to libxl_FOO struct.

The approach is:
JSON string -> libxl__json_object -> libxl_FOO struct

With this approach we can make use of libxl's infrastructure to do the
first half (JSON string -> libxl__json_object).

Second half is done by auto-generated code by libxl's IDL
infrastructure. IDL patch(es) will come later.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_internal.h
tools/libxl/libxl_json.c