kotlinx.serialization
5,952
Stars
692
Forks
98
Watchers
312
Open Issues
Apache-2.0
许可证
Kotlin
语言
2017-07-20
创建时间
2026-11-11
最近更新
项目能做什么
Kotlin 官方的多平台、多格式序列化库。
来源:基于仓库元数据
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Kotlin multiplatform / multi-format reflectionless serialization
[](https://kotlinlang.org/docs/components-stability.html)
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[](http://www.apache.org/licenses/LICENSE-2.0)
[](https://teamcity.jetbrains.com/viewType.html?buildTypeId=KotlinTools_KotlinxSerialization_Ko&guest=1)
[](http://kotlinlang.org)
[](https://central.sonatype.com/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.12.0)
[](https://kotlinlang.org/api/kotlinx.serialization/)
[](https://kotlinlang.slack.com/messages/serialization/)
Kotlin serialization consists of a compiler plugin, that generates visitor code for serializable classes,
runtime library with core serialization API and support libraries with various serialization formats.
* Supports Kotlin classes marked as `@Serializable` and standard collections.
* Provides [JSON](formats/README.md#JSON), [Protobuf](formats/README.md#ProtoBuf), [CBOR](formats/README.md#CBOR), [Hocon](formats/README.md#HOCON) and [Properties](formats/README.md#properties) formats.
* Complete multiplatform support: JVM, JS and Native.
## Table of contents
<!--- TOC -->
* [Introduction and references](#introduction-and-references)
* [Setup](#setup)
* [Gradle](#gradle)
* [1) Setting up the serialization plugin](#1-setting-up-the-serialization-plugin)
* [2) Dependency on the JSON library](#2-dependency-on-the-json-library)
* [Android](#android)
* [Multiplatform (Common, JS, Native)](#multiplatform-common-js-native)
* [Maven](#maven)
* [Bazel](#bazel)
<!--- END -->
* **Additional links**
* [Kotlin serialization documentation](https://kotlinlang.org/docs/serialization.html)
* [Full API reference](https://kotlinlang.org/api/kotlinx.serialization/)
* [Submitting issues and PRs](CONTRIBUTING.md)
* [Building this library](docs/building.md)
## Introduction and references
Here is a small example.
```kotlin
import kotlinx.serialization.*
import kotlinx.serialization.json.*
@Serializable
data class Project(val name: String, val language: String)
fun main() {
// Serializing objects
val data = Project("kotlinx.serialization", "Kotlin")
val string = Json.encodeToString(data)
println(string) // {"name":"kotlinx.serialization","language":"Kotlin"}
// Deserializing back into objec
阅读完整原文
项目深度分析 规则生成(AI 未配置)
综合评分 43.0 分。该项目在“个人可实施性”维度得 40 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。
面向细分需求的二次开发产品
| 产品构想 | 基于 kotlinx.serialization 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。 |
| 目标用户 | 该细分场景用户 |
| 难度/周期 | 中 · 2~6 周 |
| 收费模式 | 买断制 / 订阅制 / 广告 |
| 竞争风险 | 细分需求规模需验证 |
| 依据 | AI 推测:基于项目主题标签的判断 |
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
相似项目数据正在完善中,暂不展示(避免误导)
项目优势与风险
| 技术成熟度 | 创建于 2017-07-20,近 30 天仍在推送,发布过 39 个 Release |
| 社区活跃 | Star 5,952 / Fork 692 / Issue 312(数据支持,可自行核实) |
| 许可证 | Apache-2.0 |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。