How does one convert JSON object with list into something iterable?
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 436
- Forks
- 72
- Avg merge
- 1h 44m
- Merged PRs (30d)
- 1
Description
I know I can access each indexing e.g. .get(0) but how do I iterate over it?
val list = jawn.ast.JParser.parseFromString("""{"stuff": [1,2,3]}""").get
val stuff = list.get("stuff")
for (item <- stuff) println(item)
Contributor guide
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
Start with jawn.ast.JParser.parseFromString and the subsequent get calls shown in the example, then read the AST API to determine how list values are intended to be traversed. Done means the supported iteration usage is clear and documented, or the needed API change has a defined scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100