This update fixes some bugs in and made some changes to the Kotlin API. The Java API is mostly left untouched.
Changes
In Java
- Now exports the module
dev.runefox.json.kt.
In Kotlin
- All Kotlin API now resides in a separate package,
dev.runefox.json.kt, and is now part of a Java module with the same name. JsonCodecsnow has fields whose names match exactly the types they encode. E.g. theJsonCodecs.JSON_NODEis nowJsonCodecs.JsonNode.- Various companion objects of Kotlin builtins now have a
codecextension property delegating the matchingJsonCodec. E.g.Boolean.codecis the same asJsonCodecs.Boolean, which is (up to Java interop standards) the same asJsonCodec.BOOLEAN. - Kotlin code is now split into multiple source files. Should not affect compatibility.
- Various experimental Kotlin methods relating to the base API now require opt-in for
ExperimentalKotlinJsonNodeApi, or a warning is given. - Likewise, all Kotlin methods relating to the codec API now require opt-in for
ExperimentalKotlinJsonCodecApi, or a warning is given. openRangeOfandclosedRangeOfare now inline methods.
Fixes
In Java
No fixes.
In Kotlin
- Fixed
module-infoissue for the Kotlin API (#5). requireSize(IntRange)now properly checks the full range.
Get the release
You can get the release from my maven repository:
- https://mvn.runefox.dev/#/releases/dev/runefox/json/0.8.1
- https://mvn.runefox.dev/#/releases/dev/runefox/jsonkt/0.8.1
Gradle
repositories {
maven { url = uri("https://mvn.runefox.dev/releases") }
}
dependencies {
implementation("dev.runefox:json:0.8.1")
implementation("dev.runefox:jsonkt:0.8.1")
}Maven
<repositories>
<repository>
<id>Runefox Maven</id>
<url>https://mvn.runefox.dev/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>dev.runefox</groupId>
<artifactId>json</artifactId>
<version>0.8.1</version>
</dependency>
<dependency>
<groupId>dev.runefox</groupId>
<artifactId>jsonkt</artifactId>
<version>0.8.1</version>
</dependency>
</dependencies>