@@ -180,7 +180,7 @@ class ApiClient(object):
180
180
Builds a JSON POST object.
181
181
182
182
If obj is None, return None.
183
- If obj is str, int, float, bool, return directly.
183
+ If obj is str, int, long, float, bool, return directly.
184
184
If obj is datetime.datetime, datetime.date
185
185
convert to string in iso8601 format.
186
186
If obj is list, sanitize each element in the list.
@@ -190,7 +190,7 @@ class ApiClient(object):
190
190
:param obj: The data to serialize.
191
191
:return: The serialized form of data.
192
192
"""
193
- types = (str, int, float, bool, tuple)
193
+ types = (str, int, long, float, bool, tuple)
194
194
if sys.version_info < (3, 0):
195
195
types = types + (unicode,)
196
196
if isinstance(obj, type(None)):
@@ -266,14 +266,14 @@ class ApiClient(object):
266
266
267
267
# convert str to class
268
268
# for native types
269
- if klass in ['int', 'float', 'str', 'bool',
269
+ if klass in ['int', 'long', ' float', 'str', 'bool',
270
270
"date", 'datetime', "object"]:
271
271
klass = eval(klass)
272
272
# for model types
273
273
else:
274
274
klass = eval('models.' + klass)
275
275
276
- if klass in [int, float, str, bool]:
276
+ if klass in [int, long, float, str, bool]:
277
277
return self.__deserialize_primitive(data, klass)
278
278
elif klass == object:
279
279
return self.__deserialize_object(data)
@@ -501,7 +501,7 @@ class ApiClient(object):
501
501
:param data: str.
502
502
:param klass: class literal.
503
503
504
- :return: int, float, str, bool.
504
+ :return: int, long, float, str, bool.
505
505
"""
506
506
try:
507
507
value = klass(data)
0 commit comments