linkedin / linkedin/Burrow

Implement UnmarshalJSON method for StatusConstant

Open
#423 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
4k
Forks
818
Avg merge
1h 14m
Merged PRs (30d)
1

Description

I am trying to use the `ConsumerGroupStatus` struct in the library for reading the response of an API but can't do that right now. I get this error.
```
json: cannot unmarshal string into Go struct field ConsumerGroupStatus.status of type protocol.StatusConstant
```

I suppose this is because `StatusConstant` doesn't have an UnmarshalJSON method. I can add that in if it sounds like a good idea? This would help me used the structs exposed by burrow instead of duplicating them.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the StatusConstant and ConsumerGroupStatus definitions, then reproduce the reported JSON decoding error using the API response described in the issue. Done means ConsumerGroupStatus can be unmarshaled when its status is represented as a JSON string.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.