-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Group error: Error: illegal token '{', ';' expected #568
Comments
This is because v6 has no support for (long deprecated) legacy groups. If you can, the official guide recommends to use inner messages instead. More precisely, the parser currently throws for groups and the decoder skips over groups. |
This commit should add support for legacy groups to the parser (splits up the group into an upper cased type with a special group flag and a lower cased field referencing that type) and to the encoder/decoder including fallbacks. For example message MyMessage {
required group MyGroup = 1 {
required uint32 something = 2;
}
} results in a type named It passes a simple test case, but there is a chance that I've got the wire format wrong. So please give it a try and let me know! |
Ohh cool thanks it works. |
Feel free to reopen when encountering any issues! |
protobuf.js version: [email protected]
Parsing error
Proto file:
Error:
The text was updated successfully, but these errors were encountered: