feature: Support configuring the max line length
- Dominant language
- Go
- Stars
- 9
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
It would be great to be able to set the MaxLineLength via a parameter to the `CompareJson` function. Having it hard-coded to 50 is a reasonable default, but some apps have a lot of horizontal space and don't want to wrap the JSON as frequently.
```
diff, err := jsonDiff.CompareJSON(json1, json2, nil, false)
```
I don't know the project well enough to propose an API (Could be a MaxLineLength function parameter, or a settings struct to support more options in a backwards compatible manner). But if someone else suggests a good api, I'm happy to implement this.
Contributor guide
Research direction
Start by reading the CompareJSON implementation and locating where the default maximum line length of 50 is applied. Review the existing function signature and usage shown in the issue before choosing a backward-compatible configuration approach; done means callers can configure the limit while the current default remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100