Remove dependence on json-glib, use jansson instead.
Fix a compile error.