[ease/animate_zoom: 12/15] JSON parser and generator for loading and saving files.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/animate_zoom: 12/15] JSON parser and generator for loading and saving files.
- Date: Sun, 30 May 2010 21:35:28 +0000 (UTC)
commit dde896b6b3a83a04c9928d1ad476b6e8c5d4f14a
Author: Nate Stedman <natesm gmail com>
Date: Sat May 29 03:54:02 2010 -0400
JSON parser and generator for loading and saving files.
Seems to work properly - should be tested more before merging to master.
configure.ac | 2 +-
src/JSONParser.vala | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 078661a..9c12a6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ GNOME_MAINTAINER_MODE_DEFINES
dnl FIXME
pkg_modules="clutter-gtk-0.10 >= 0.10 gee-1.0 >= 0.5.0 clutter-gst-1.0 >= 1.0.0 json-glib-1.0 >= 0.7.6"
-EASE_PACKAGES="--pkg glib-2.0 --pkg gtk+-2.0 --pkg clutter-1.0 --pkg gdk-2.0 --pkg libxml-2.0 --pkg gee-1.0 --pkg clutter-gtk-0.10 --pkg cogl-1.0 --pkg gio-2.0 --pkg clutter-gst-1.0"
+EASE_PACKAGES="--pkg glib-2.0 --pkg gtk+-2.0 --pkg clutter-1.0 --pkg gdk-2.0 --pkg libxml-2.0 --pkg gee-1.0 --pkg clutter-gtk-0.10 --pkg cogl-1.0 --pkg gio-2.0 --pkg clutter-gst-1.0 --pkg json-glib-1.0"
PKG_CHECK_MODULES(EASE, [$pkg_modules])
diff --git a/src/JSONParser.vala b/src/JSONParser.vala
index f4ff5c9..17e0547 100644
--- a/src/JSONParser.vala
+++ b/src/JSONParser.vala
@@ -139,6 +139,7 @@ public static class Ease.JSONParser
var generator = new Json.Generator();
generator.set_root(root);
generator.pretty = true;
+
generator.to_file(document.path + "/Document.json");
}
@@ -174,6 +175,7 @@ public static class Ease.JSONParser
{
elements.add_element(e.data.to_json());
}
+
obj.set_array_member("elements", elements);
node.set_object(obj);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]