diff --git a/VERSION b/VERSION index 24370613..f52853a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.9.9-stable+timestamp.2014.09.13.18.54.57 +Version 2.9.9-stable+timestamp.2014.09.14.11.58.10 diff --git a/gluon/dal.py b/gluon/dal.py index 09a41a03..a37923ae 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5053,6 +5053,17 @@ class GoogleDatastoreAdapter(NoSQLAdapter): def parse_id(self, value, field_type): return value + def represent(self, obj, fieldtype): + if fieldtype == "json": + if have_serializers: + return serializers.json(obj) + elif simplejson: + return simplejson.dumps(obj) + else: + raise Exception("Could not dump json object (missing json library)") + else: + return NoSQLAdapter.represent(self, obj, fieldtype) + def create_table(self, table, migrate=True, fake_migrate=False, polymodel=None): myfields = {} for field in table: