abujehad139 / google-api-go-client

Automatically exported from code.google.com/p/google-api-go-client
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

some integers need to be serialized as strings #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If the JSON describes an API parameter or property as having type=="string" but 
format=="int64", etc, it needs to be un/marshalled as a string.

(This is because JavaScript only has doubles and 52 bits of integer precission)

Until this is fixed, some parameters won't work.  Parameters that go in the URL 
are fine, but ones that are in JSON bodies probably won't work.

Related:
http://codereview.appspot.com/4918051/

Original issue reported on code.google.com by bradfitz@google.com on 25 Aug 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Wherever this is an issue, the auto-generated code now has this comment:

  // WARNING: this field may not work, until this bug is fixed:
  // http://code.google.com/p/google-api-go-client/issues/detail?id=1

Original comment by bradfitz@google.com on 25 Aug 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Fixed by:
http://code.google.com/p/google-api-go-client/source/detail?r=b8d5df551766d42e2a
023c55f7ab9c55b4396ccd

which requires Go change:
http://code.google.com/p/go/source/detail?r=ba6daf799367519ebd5f161bf3b53db3dcbb
3828

Original comment by bradfitz@google.com on 29 Aug 2011 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by bradfitz@google.com on 29 Aug 2011 at 9:20