#endif
#include "json.h"
+
+gint
+zak_utils_json_get_integer (JsonReader *reader, const gchar *name)
+{
+ gint ret;
+
+ json_reader_read_member (reader, name);
+ ret = json_reader_get_int_value (reader);
+ json_reader_end_member (reader);
+
+ return ret;
+}
+
+gdouble
+zak_utils_json_get_double (JsonReader *reader, const gchar *name)
+{
+ gdouble ret;
+
+ json_reader_read_member (reader, name);
+ ret = json_reader_get_double_value (reader);
+ json_reader_end_member (reader);
+
+ return ret;
+}
+
+const gchar
+*zak_utils_json_get_string (JsonReader *reader, const gchar *name)
+{
+ const gchar *ret;
+
+ json_reader_read_member (reader, name);
+ ret = json_reader_get_string_value (reader);
+ json_reader_end_member (reader);
+
+ return ret;
+}
+
+gboolean
+zak_utils_json_get_boolean (JsonReader *reader, const gchar *name)
+{
+ gboolean ret;
+
+ json_reader_read_member (reader, name);
+ ret = json_reader_get_boolean_value (reader);
+ json_reader_end_member (reader);
+
+ return ret;
+}
G_BEGIN_DECLS
+gint zak_utils_json_get_integer (JsonReader *reader, const gchar *name);
+gdouble zak_utils_json_get_double (JsonReader *reader, const gchar *name);
+const gchar *zak_utils_json_get_string (JsonReader *reader, const gchar *name);
+gboolean zak_utils_json_get_boolean (JsonReader *reader, const gchar *name);
G_END_DECLS