Skip to content

JsonReaderException when parsing other JSON within scanValuesFromStream #923

Closed
@ski309

Description

@ski309

Hello, I just discovered that if I call scanJsonValuesFromStream to parse a file of JSON objects, then try to parse separate JSON from within the lambda, a JsonReaderException is thrown with the message, expected '{', offset: 0x00000000, buf: .... The buffer data shown is in a location within the InputStream.

example:

val aData: String = ???
val in: InputStream = ???
Using.resource(in) { in =>
  scanJsonValuesFromStream[A](in) { a =>
    readFromString[A](aData)
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions