Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async parsing accepts weird stuff #143

Closed
travisbrown opened this issue Jan 4, 2019 · 0 comments
Closed

Async parsing accepts weird stuff #143

travisbrown opened this issue Jan 4, 2019 · 0 comments

Comments

@travisbrown
Copy link
Contributor

Noted by @BenFradet here. Might be #135?

scala> import org.typelevel.jawn.{AsyncParser, NullFacade}
import org.typelevel.jawn.{AsyncParser, NullFacade}

scala> val p = AsyncParser[Unit](AsyncParser.UnwrapArray)
p: org.typelevel.jawn.AsyncParser[Unit] = org.typelevel.jawn.AsyncParser@3b623061

scala> p.absorb("}")(NullFacade)
res0: Either[org.typelevel.jawn.ParseException,Seq[Unit]] = Right(ArrayBuffer())

In 0.13.0 you get an error:

scala> p.absorb("}")(NullFacade)
res0: Either[jawn.ParseException,Seq[Unit]] = Left(jawn.ParseException: expected json value got } (line 1, column 1))

(Both 0.13.0 and 0.14.0 fail with the same error on finish.)

travisbrown added a commit that referenced this issue Jan 4, 2019
@travisbrown travisbrown mentioned this issue Jan 4, 2019
travisbrown added a commit that referenced this issue Jan 4, 2019
This reverts commit e609de1.
travisbrown added a commit that referenced this issue Jan 4, 2019
travisbrown added a commit that referenced this issue Jan 4, 2019
travisbrown added a commit that referenced this issue Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant