typelevel / typelevel/jawn

How to do stream parsing?

Open
#95 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
436
Forks
72
Avg merge
1h 44m
Merged PRs (30d)
1

Description

I have tried to use the AsyncParser but I couldn't figure out how to get anything out other than a single jsobject as defined by my AST (in this case Play JSON).

Assume I have something like:

{
  "name": "thing"
  "elements": [{
    "key": "a",
    "value": "alice"
  },{
    "key": "b",
    "value": "bob"
  },
  ...
  ]
}

How can I get it so that each call to absorb will return zero or more elements?

Contributor guide

Open the contributing guide

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 reading the AsyncParser API and the absorb entry point, using the Play JSON AST example in the issue as the expected integration. Determine whether parsing can expose individual elements incrementally rather than one jsobject, and check the existing parser tests for streaming behavior. Done means the supported approach is documented or the requested incremental output is implemented and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.