On Thu, Dec 31, 2015 at 8:42 AM, <[email protected]> wrote:

> Hi,
>
> For context, we are using proto3 messages as our main data model and we
> are exporting some messages to Google BigQuery.
>
> In order to automate things a bit we wrote a protoc plugin
> to generate bigquery schemas automatically from our .proto files,
> and given that BigQuery objects are just json, we use JsonFormat to
> translate messages directly into json.
>
> This is pretty much fantastic, except for the only fact that we would like
> some of our int64 fields to be int64 fields in BigQuery, thus we must rely
> on a fork of JsonFormat that allows us to write int64 fields as numbers
> instead of strings.
>
I'm not familiar with BigQuery. Is the problem that when you send a JSON
request with int64 field as strings, the sever will reject such requests?


>
> Would the proto3 team be opened to having JsonFormat extra options
> that would allow for doing that kind of stuff (eg: writing int64 as
> numbers)?
>
If that's the only feasible option, we should do it to make proto3 JSON
compatible with other Google APIs. Though I'm not sure I understand the
problem fully yet. Maybe there is something we can do on the BigQuery side?
Like making BigQuery accept int64 field as strings?


>
> Now I understand that the decision of writing int64 as strings is probably
> because
> of javascript in browsers, however there are various server side json
> libraries that
> will happily accept 64bit json numbers (of which BigQuery is one), so that
> kind of
> option could make sense...
>
> Thanks a lot,
>
> Christian
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to