|
1 | | -[](https://github.com/adamko-dev/kotlinx-serialization-typescript-generator/blob/main/LICENSE) |
2 | | -[](https://search.maven.org/search?q=g:dev.adamko.kxstsgen) |
3 | | -[](https://jitpack.io/#adamko-dev/kotlinx-serialization-typescript-generator) |
| 1 | +[](https://github.com/adamko-dev/kxstsgen/blob/main/LICENSE) |
| 2 | +[](https://search.maven.org/search?q=g:dev.adamko.kxstsgen) |
| 3 | +[](https://s01.oss.sonatype.org/content/repositories/snapshots/dev/adamko/kxstsgen/kxs-ts-gen-core/) |
4 | 4 |
|
5 | 5 | # Kotlinx Serialization TypeScript Generator |
6 | 6 |
|
7 | 7 | [Kotlinx Serialization TypeScript Generator](https://github.com/adamko-dev/kotlinx-serialization-typescript-generator) |
8 | | -creates TypeScript interfaces from |
| 8 | +(or **kxs-ts-gen** for short) creates TypeScript interfaces from |
9 | 9 | [Kotlinx Serialization](https://github.com/Kotlin/kotlinx.serialization/) |
10 | | -classes. |
| 10 | +classes, allowing for quick and easy communication via JSON with a Kotlin-first approach. |
11 | 11 |
|
12 | 12 | ```kotlin |
| 13 | +import kotlinx.serialization.* |
| 14 | +import dev.adamko.kxstsgen.* |
| 15 | + |
13 | 16 | @Serializable |
14 | 17 | class MyClass( |
15 | 18 | val aString: String, |
@@ -39,17 +42,16 @@ export interface MyClass { |
39 | 42 |
|
40 | 43 | Only Kotlinx Serialization |
41 | 44 | [`SerialDescriptor`s](https://kotlin.github.io/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization.descriptors/-serial-descriptor/index.html) |
42 | | -are used to generate TypeScript. They are flexible and comprehensive enough to allow for accurate TypeScript code, without any deviation. |
| 45 | +are used to generate TypeScript. |
| 46 | +They are flexible and comprehensive enough to allow for accurate TypeScript code, without any |
| 47 | +surprises. |
43 | 48 |
|
44 | | -See [the docs](./docs) for working examples. |
| 49 | +See |
| 50 | +[the docs](https://adamko-dev.github.io/kotlinx-serialization-typescript-generator/) |
| 51 | +for working examples. |
45 | 52 |
|
46 | 53 | ## Status |
47 | 54 |
|
48 | | -This is a proof-of-concept. |
49 | | - |
50 | | -The aim is to create TypeScript interfaces that can accurately produce Kotlinx Serialization |
51 | | -compatible JSON. |
52 | | - |
53 | 55 | | | Status | Notes | |
54 | 56 | |---------------------------------------|-----------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------| |
55 | 57 | | Kotlin multiplatform | ❓ | The codebase is multiplatform, but only JVM has been tested | |
|
0 commit comments