{"id":19587135,"url":"https://github.com/kantis/ks3","last_synced_at":"2025-04-27T12:31:27.772Z","repository":{"id":61922684,"uuid":"555826836","full_name":"Kantis/ks3","owner":"Kantis","description":"KotlinX Serialization Standard Serializers (KS3)","archived":false,"fork":false,"pushed_at":"2024-09-10T15:42:26.000Z","size":1093,"stargazers_count":19,"open_issues_count":20,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-10T17:28:49.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kantis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-22T12:26:51.000Z","updated_at":"2024-08-19T07:50:10.000Z","dependencies_parsed_at":"2023-11-23T13:28:17.048Z","dependency_job_id":"9d488b76-598b-4508-b32b-d4105f84ad70","html_url":"https://github.com/Kantis/ks3","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":"Kantis/kotlin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kantis%2Fks3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kantis%2Fks3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kantis%2Fks3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kantis%2Fks3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kantis","download_url":"https://codeload.github.com/Kantis/ks3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069488,"owners_count":17250456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T08:01:39.749Z","updated_at":"2025-04-27T12:31:27.766Z","avatar_url":"https://github.com/Kantis.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KotlinX Serialization Standard Serializers (KS3)\n![Stability Status - Stable](https://kotl.in/badges/stable.svg)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kantis/ks3/ci.yaml?branch=main)\n\nThis project solves two things:\n* Provides [out-of-the-box serializers](https://github.com/Kantis/ks3/blob/main/doc/jdk.md) for a lof of commonly used Java types.\n* Provides [utilities](https://github.com/Kantis/ks3/blob/main/doc/builders.md) for more conveniently defining your own serializers by composition.\n\nThis is accomplished without any additional footprint (the project only depends on KotlinX serialization itself).\n\n## Contributing\nSee the contribution guide [here](CONTRIBUTING.md).\n\n## Compatibility\n\n| Ks3 | Kotlin | KotlinX serialization |\n|-----|--------|-----------------------|\n| 1.0 | 1.9+   | 1.6+                  |\n\n## Getting started\n\nAdd the dependency. With Gradle:\n\n```kotlin\ndependencies {\n    implementation(\"io.ks3:ks3-jdk:1.0.0\")\n}\n```\n\nMaven:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.ks3\u003c/groupId\u003e\n  \u003cartifactId\u003eks3-jdk-jvm\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\u003e Note that when using Maven dependencies must specify the multiplatform variant. For example, append `-jvm` to specify the JVM variant of `ks3-jdk`.\n\nNow you can start using the provided serializers. There's several possible ways to do this.\n\n* Using [contextual serialization](https://github.com/Kotlin/kotlinx.serialization/blob/1.4.1-release/docs/serializers.md#contextual-serialization)\n* [Passing a serializer manually](https://github.com/Kotlin/kotlinx.serialization/blob/1.4.1-release/docs/serializers.md#passing-a-serializer-manually)\n* [Specifying serializer on a property](https://github.com/Kotlin/kotlinx.serialization/blob/1.4.1-release/docs/serializers.md#specifying-serializer-on-a-property)\n* [Specifying serializers for a file](https://github.com/Kotlin/kotlinx.serialization/blob/1.4.1-release/docs/serializers.md#specifying-serializers-for-a-file)\n* [Specifying serializer using a typealias](https://github.com/Kotlin/kotlinx.serialization/blob/1.4.1-release/docs/serializers.md#specifying-serializer-globally-using-typealias)\n\n\n### Using `typealias`\n\n```kotlin\ntypealias LocalDateTimeAsString = @Serializable(LocalDateTimeAsStringSerializer::class) LocalDateTime\n\ndata class Appointment(\n  val datetime: LocalDateTimeAsString\n)\n```\n\n\u003e For details, see the [kotlinx.serialization guide](https://github.com/Kotlin/kotlinx.serialization/blob/1.4.1-release/docs/serializers.md#specifying-serializer-globally-using-typealias)\n\nThis method is most useful when you want to use different serial formats for the same type, or when you can't configure the serializer itself.\n\n### Using `@Contextual`\n\n\u003e See the details in [kotlinx.serialization guide](https://github.com/Kotlin/kotlinx.serialization/blob/1.4.1-release/docs/serializers.md#contextual-serialization)\n\n```kotlin\n@Serializable\nclass ProgrammingLanguage(\n    val name: String,\n    @Contextual\n    val stableReleaseDate: Date\n)\n\nprivate val module = SerializersModule {\n  contextual(DateAsLongSerializer)\n}\n\nval format = Json { serializersModule = module }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkantis%2Fks3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkantis%2Fks3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkantis%2Fks3/lists"}