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

Extend protostream enc/decoder to basic types #86

Closed
rigazilla opened this issue Aug 8, 2022 · 3 comments
Closed

Extend protostream enc/decoder to basic types #86

rigazilla opened this issue Aug 8, 2022 · 3 comments
Assignees
Labels

Comments

@rigazilla
Copy link
Contributor

rigazilla commented Aug 8, 2022

Current protostream implementation only decodes user message, but protrostream has dedicated fields for basic types.
Each supported basic type has its own tag and accessor and needs to be managed correctly.
an example of code handling "basic types" vs "user message" in C# is here (this is improperly provided as part of the query feature)
An equivalent implementation is needed for the enc/decoderProtobuf

@rigazilla
Copy link
Contributor Author

extension of the previous work for #72

@rigazilla
Copy link
Contributor Author

Since there's only one numeric type in Javascript (Numeric which is an IEEE double), I would propose to simplify encoding work like this:
Encoding

Javascript WrappedMessage OneOf Field
Number wrappedDouble
Boolean wrappedBoolean
String WrappedString
ArrayBuffer WrappedBytes

decoding

WrappedMessage OneOf Field Javascript
every numeric field wrappedDouble
WrappedString String
WrappedBoolean Boolean
WrappedBytes ArrayBuffer

@rigazilla
Copy link
Contributor Author

Implemented via #88 .
Enum type not implemented, leaved for future enhancement

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

No branches or pull requests

2 participants