-
Notifications
You must be signed in to change notification settings - Fork 132
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
FieldMask JSON read/write (snake_case <-> camelCase) is non-conforming #396
Comments
@timostamm any plans/thoughts to align it? |
@hugebdu, we should match the C++ implementation. It's very likely that protobuf-es has the same issue. |
@timostamm |
From field_mask_util_test.cc:
FieldMask.toJson()
(snake_case -> camelCase)The existing implementation fails tests 2 and 3 for
Any character after a "_" must be a lowercase letter.
as these do not throw errors:I believe this could trivially be fixed with the following change to packages/plugin/src/message-type-extensions/well-known-types.ts
FieldMask.fromJson()
(camelCase -> snake_case)The existing implementation fails the second expectation:
This failure is purely due to this one line but the git blame is so old and part of a commit simply titled "transferring to github.com" that it has become a classic Chesterton's Fence situation.
protobuf-ts/packages/plugin/src/message-type-extensions/well-known-types.ts
Line 382 in 3eea598
Again, I believe this could be trivially fixed.
The text was updated successfully, but these errors were encountered: