Remove leading space from key(s)
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 32
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Leading space in string of elements key(s) returned from json_get_keys() should be suppressed / removed.
Parsing the returned string with shell parameter expansion(s) results in incorrect value(s) -
# json_get_keys _s
# $_s = ' key0 key1 key2'
echo ${_s#* } # ' key0 key1 key2'
echo ${_s# * } # 'key1 key2'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the libubox sources for the json_get_keys() implementation and inspect how its returned key string is assembled. Confirm that the first key has no leading space, then verify the shell parameter-expansion example no longer produces the incorrect value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100