Fixes issue #85. Also moves all json imports to go through oauth2client.anyjson. Reviewed in http://codereview.appspot.com/5531064/.
diff --git a/apiclient/schema.py b/apiclient/schema.py
index cd5a7cb..ddcd670 100644
--- a/apiclient/schema.py
+++ b/apiclient/schema.py
@@ -62,7 +62,7 @@
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
import copy
-from apiclient.anyjson import simplejson
+from oauth2client.anyjson import simplejson
class Schemas(object):
@@ -262,13 +262,13 @@
self.emitEnd('%s,' % str(value), schema.get('description', ''))
elif stype == 'string':
value = schema.get('default', 'A String')
- self.emitEnd('"%s",' % value, schema.get('description', ''))
+ self.emitEnd('"%s",' % str(value), schema.get('description', ''))
elif stype == 'integer':
- value = schema.get('default', 42)
- self.emitEnd('%d,' % value, schema.get('description', ''))
+ value = schema.get('default', '42')
+ self.emitEnd('%s,' % str(value), schema.get('description', ''))
elif stype == 'number':
- value = schema.get('default', 3.14)
- self.emitEnd('%f,' % value, schema.get('description', ''))
+ value = schema.get('default', '3.14')
+ self.emitEnd('%s,' % str(value), schema.get('description', ''))
elif stype == 'null':
self.emitEnd('None,', schema.get('description', ''))
elif stype == 'any':