Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Publish version 0.2.1 of the library
Browse files Browse the repository at this point in the history
  • Loading branch information
xn32 committed Nov 1, 2022
1 parent 70de34a commit 2b59860
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 36 deletions.
33 changes: 5 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build status](https://img.shields.io/github/workflow/status/xn32/json5k/Build)](https://github.com/xn32/json5k/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/xn32/json5k/branch/main/graph/badge.svg?token=PBPA7T92CC)](https://codecov.io/gh/xn32/json5k)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.xn32/json5k)](https://search.maven.org/artifact/io.github.xn32/json5k/)
[![API documentation](https://img.shields.io/badge/docs-Dokka-informational)](https://xn32.github.io/json5k/api/)

This is an experimental [JSON5](https://json5.org/) library for Kotlin/JVM.
Expand All @@ -10,53 +11,29 @@ It makes use of the [kotlinx.serialization](https://github.com/Kotlin/kotlinx.se
## Key features

- Compliance with [v1.0.0](https://spec.json5.org/1.0.0/) of the JSON5 specification
- Support for polymorphic types and configurable class discriminator names
- Support for polymorphic types and configurable class discriminators
- Carefully composed error messages for deserialization errors
- Support for the serialization of comments for class properties
- Rejection of duplicate keys during deserialization

## Setup instructions

This repository contains a Gradle setup that compiles the library into a JAR file. Use this file according to your needs.

### Recommended versions

json5k was tested against the following dependencies:

| json5k | Kotlin plugins | Serialization runtime |
|--------|----------------|-----------------------|
| v0.2.0 | v1.7.20 | v1.4.1 |
| v0.1.0 | v1.7.10 | v1.4.0 |

### Usage from Gradle

For evaluation purposes, the easiest solution might be to install the library to your local Maven repository:
```bash
./gradlew publishToMavenLocal
```

Afterwards, use it from `build.gradle.kts` as follows:
json5k is available on [Maven Central](https://search.maven.org/artifact/io.github.xn32/json5k):
```kotlin
plugins {
kotlin("jvm") version "1.7.20"
kotlin("plugin.serialization") version "1.7.20"
}

repositories {
mavenLocal {
content {
includeGroup("io.github.xn32")
}
}
mavenCentral()
}

dependencies {
implementation("io.github.xn32:json5k:0.2.0")
implementation("io.github.xn32:json5k:0.2.1")
}
```

However, keep the [limitations](https://docs.gradle.org/7.5/userguide/declaring_repositories.html#sub:maven_local) of the local Maven repository in mind.

## Usage examples

### Non-hierarchical values
Expand Down
9 changes: 8 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group = "io.github.xn32"
version = "0.2.1-SNAPSHOT"
version = "0.2.1"

repositories {
mavenCentral()
Expand Down Expand Up @@ -49,6 +49,13 @@ publishing {
developerConnection.set("scm:git:ssh://git@github.com/xn32/json5k.git")
}

developers {
developer {
id.set("xn32")
url.set("https://github.com/xn32")
}
}

licenses {
license {
name.set("The Apache Software License, Version 2.0")
Expand Down
14 changes: 7 additions & 7 deletions dokka/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Module json5k
This is a [JSON5](https://json5.org) library for the Kotlin programming language. Is is implemented as a third-party format for the [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization)
framework and can both parse and generate JSON5 text.
This is an experimental [JSON5](https://json5.org) library for Kotlin/JVM. Is is implemented as a third-party format for the [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization)
framework and can be used to both parse and generate JSON5 text.

## Key features
Key features of the library include:
- Compliance with v1.0.0 of the JSON5 specification
- Support for polymorphic types and configurable class discriminator names
- Carefully composed error messages for deserialization errors
- Compliance with v1.0.0 of the JSON5 specification
- Support for polymorphic types and configurable class discriminators
- Carefully composed error messages for deserialization errors

Find a full overview of the library's capabilities [on GitHub](https://github.com/xn32/json5k).
A full description is available [on GitHub](https://github.com/xn32/json5k).

# Package io.github.xn32.json5k
Main package encapsulating all public API of the library.
Main package encapsulating the public API of the library.

0 comments on commit 2b59860

Please sign in to comment.