JsonFormat - allow one-liners
With proposed change simpler code is possible, for example
FooMessage fooMessage = JsonFormat.parser().merge(json, FooMessage.newBuilder()).build();
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
I see now I shoud add some generics to achieve my goal. Returning just Message.Builder needs downcasting.
FooMessage fooMessage = (FooMessage) JsonFormat.parser().merge(json, FooMessage.newBuilder()).build();
I will continue PR development
@michaldo @midovlvn Be sure to sign the CLA so we can look at your PR when it is ready.
@michaldo @midovlvn Be sure to sign the CLA so we can look at your PR when it is ready.
cla/google check pass, I think CLA is signed well
@googleberg @shaod2 please tell me clearly if you expect any action from my side.
We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.
This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.
This PR is active.
We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.
This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.
This PR is active.
We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.
This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.
This PR is active.
We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.
This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.
This PR is active.
@michaldo I've tried to rerun the tests a couple of times. I suspect that you need to rebase and we can try again.
@michaldo I've tried to rerun the tests a couple of times. I suspect that you need to rebase and we can try again.
I just synchronized my branch with main
Oh shoot. @midovlvn it looks like you still haven't signed the CLA. We can't go any further until that happens.
@googleberg I see one merge commit is signed by my corporate git account by mistake. I prefer do not sign any licence with my corporate account. Maybe I will close this PR and I open new one, only with commits signed by my private git account with signed CLA?
Finally I made force-push on my branch and I removed commits from my corporate account
@michaldo I'm so sorry to realize this late. I can't merge this change because it changes the return type of public methods. That isn't ABI compatible -- it qualifies as a mildly breaking change and we will get complaints. I can put it on the list of breaking changes for PBJ 5.x in 2026 Q1.
@michaldo I'm so sorry to realize this late. I can't merge this change because it changes the return type of public methods. That isn't ABI compatible -- it qualifies as a mildly breaking change and we will get complaints. I can put it on the list of breaking changes for PBJ 5.x in 2026 Q1.
Go ahead!