As a follow-up to #40, no reason to expand the scope of that PR with this:
kotlinx-serialization-json-io supports deserialization from a Source and serialization to a Sink. These are the multiplatform equivalents to Java's InputStream and OutputStream, respectively.
Being able to directly serialize/deserialize to/from a stream of bytes (as served from a HTTP connection or reading a file) will improve speed and memory footprint when dealing with large GeoJsons because the step to first put it all into a string is omitted.
This could be offered as an additional optional dependency, because kotlinx-serialization-json-io pulls in another dependency, kotlinx-io.
As a follow-up to #40, no reason to expand the scope of that PR with this:
kotlinx-serialization-json-iosupports deserialization from aSourceand serialization to aSink. These are the multiplatform equivalents to Java'sInputStreamandOutputStream, respectively.Being able to directly serialize/deserialize to/from a stream of bytes (as served from a HTTP connection or reading a file) will improve speed and memory footprint when dealing with large GeoJsons because the step to first put it all into a string is omitted.
This could be offered as an additional optional dependency, because
kotlinx-serialization-json-iopulls in another dependency,kotlinx-io.