-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: Do we support Timestamp type? #94
Comments
Yeah, we don't currently support importing google protobuf extensions. Same as #92 As a workaround, you can inline Timestamp definition from Google: |
Great thanks |
@mourner One more question. For float field, If I input 987654321 I get 987654336 back. I know that is because of 'ieee754' encoding. But just want to ensure that if this problem persist with actual google library as well? (TBH I didn't tested that yet) |
@amitguptagwl const assert = require('assert');
const num = 987654321;
const expected = 987654336;
const buf = Buffer.alloc(4);
buf.writeFloatLE(num);
const actual = buf.readFloatLE();
assert.strictEqual(actual, expected); If you use a double precision float (64-bit, |
Thanks @kjvalencik . I actually noticed that google protobuf implementation stops user to write data which is out of range or can't read same. Shouldn't we do the same? |
I don't think so. Those bounds check could impact performance. Also, there are some intentional inaccuracies. For example, |
Hmm |
Here is the complete list supported by protobuf 3: https://developers.google.com/protocol-buffers/docs/proto3#json
I face an issue in compiling proto file with Timestamp field. So I was wondering if I'm using the wrong syntax or it is not supported.
The text was updated successfully, but these errors were encountered: