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

Can not convert struct creating by golang package #9

Closed
allanassis opened this issue Jun 1, 2021 · 4 comments
Closed

Can not convert struct creating by golang package #9

allanassis opened this issue Jun 1, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@allanassis
Copy link

allanassis commented Jun 1, 2021

Hi, I am trying to use the decode method from pb-util and I am having an issue.
I have a grpc server written in golang and it returns to me a message in this format.

{
  "values": {
    "fields": {
      "url": {
        "stringValue": "url-da-receita"
      },
      "nested": {
        "structValue": {
          "fields": {
            "foo": {
              "stringValue": "bar"
            }
          }
        }
      }
    }
  },
  "message": "Ok"
}

I am trying to convert this message using your package but seems not to work.
I don't know why but seems the structure is a bit different because this message generated does not have the kind property.

@callmehiphop
Copy link
Owner

👋 @allanassis - thanks for the bug report! I went ahead and prepared a branch (#10) with a potential fix, would you be able to give it a test run to see if resolves your issues?

@callmehiphop callmehiphop added the bug Something isn't working label Jun 1, 2021
@allanassis
Copy link
Author

allanassis commented Jun 1, 2021

Thanks, @callmehiphop! It works!

Thanks for solving my problem so quickly.

@callmehiphop
Copy link
Owner

@allanassis that's actually a really good question! I think that kind has always been optional when creating request messages, so maybe it is just optional everywhere. 🤷

Anyway, I'm going to do a little housekeeping, but I should have a release with this fix cut today. Thanks again for the bug report!

@callmehiphop
Copy link
Owner

Just published v1.0.0, if you spot any regressions,etc., please let me know! Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants