Skip to content
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

check default values for encode/decode #39

Closed
2 tasks done
Tracked by #32
pyramation opened this issue Apr 30, 2022 · 0 comments
Closed
2 tasks done
Tracked by #32

check default values for encode/decode #39

pyramation opened this issue Apr 30, 2022 · 0 comments

Comments

@pyramation
Copy link
Collaborator

pyramation commented Apr 30, 2022

I've seen some with 0, Long.UZERO, but now some that are undefined.

      nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : 0,
      boolValue: isSet(object.boolValue) ? Boolean(object.boolValue) : false,
      int64Value: isSet(object.int64Value) ? Long.fromString(object.int64Value) : undefined,
      uint64Value: isSet(object.uint64Value) ? Long.fromString(object.uint64Value) : Long.UZERO,
      doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : undefined,
      stringValue: isSet(object.stringValue) ? String(object.stringValue) : \\"\\",
      bytesValue: isSet(object.bytesValue) ? bytesFromBase64(object.bytesValue) : new Uint8Array(),
      durationValue: isSet(object.durationValue) ? Duration.fromJSON(object.durationValue) : undefined,
      timestampValue: isSet(object.timestampValue) ? Timestamp.fromJSON(object.timestampValue) : undefined

both unsigned and signed zeros

  • UZERO
  • ZERO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant