Change to a C style API which is based on jansson API.

Signed-off-by: Thiago Farina <tfarina@chromium.org>