kotlinx.serialization icon indicating copy to clipboard operation
kotlinx.serialization copied to clipboard

Consider to implement ReaderJsonLexer::peekLeadingMatchingValue?

Open iseki0 opened this issue 1 year ago • 0 comments

What is your use-case and why do you need this feature? Polymorphic deserialization on stream also expects a well performance.

Describe the solution you'd like Would using InputStream#mark and InputStream#reset to implement this method be a good solution?

https://github.com/Kotlin/kotlinx.serialization/blob/d0ae697b9394103879e6c7f836d0f7cf128f4b1e/formats/json/commonMain/src/kotlinx/serialization/json/internal/lexer/ReaderJsonLexer.kt#L178-L180

iseki0 avatar Apr 14 '24 17:04 iseki0