https://github.com/fab1an/kotlin-json-stream
Kotlin-Multiplatform JSON stream serialization
https://github.com/fab1an/kotlin-json-stream
json kotlin multiplatform okio
Last synced: about 2 months ago
JSON representation
Kotlin-Multiplatform JSON stream serialization
- Host: GitHub
- URL: https://github.com/fab1an/kotlin-json-stream
- Owner: fab1an
- License: apache-2.0
- Created: 2023-03-22T05:45:19.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-21T05:16:52.000Z (3 months ago)
- Last Synced: 2025-03-29T01:41:20.441Z (2 months ago)
- Topics: json, kotlin, multiplatform, okio
- Language: Kotlin
- Homepage: https://fab1an.github.io/kotlin-json-stream/
- Size: 939 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Kotlin Json Stream - Kotlin-Multiplatform JSON stream serialization
[](https://mvnrepository.com/artifact/com.fab1an/kotlin-json-stream)
[](http://semver.org/)
[](https://github.com/fab1an/kotlin-json-stream/blob/master/LICENSE)
[](https://github.com/fab1an/kotlin-json-stream/actions/workflows/build-master.yml)
[](https://scorecard.dev/)
[](https://www.bestpractices.dev/projects/8911)## Dokumentation
This library is a kotlin-multiplatform streaming JSON-parser. It is based on OKIO for performance.
### API-Docs
https://fab1an.github.io/kotlin-json-stream/### Example
```kotlin
fun test() {
val json = JsonReader("""{"stringProp":"string", "intProp":0}""")json.beginObject()
json.nextName() shouldEqual "stringProp"
json.nextString() shouldEqual "string"
json.nextName() shouldEqual "intProp"
json.nextInt() shouldEqual 0
json.endObject()
}
infix fun T.shouldEqual(expected: T) {
assertEquals(expected, this)
}
```