A Kotlin compatibility layer for working with the net.sf.json-lib
JSON Library.
import nz.ahw.kompat.jsonlib.*
val values = jsonArrayOf(1,2,3) // [1,2,3]
val json = jsonObjectOf("values" to values) // {"values":[1,2,3]}
json["message"] = "An important note"
values += 4
if("message" in json) { ... }
Configure to use the kompat repository
<repository>
<id>bintray-ahwnz-kompat</id>
<name>bintray-kompat</name>
<url>https://dl.bintray.com/ahwnz/kompat</url>
</repository>
Add the dependency
<dependency>
<groupId>nz.ahw.kompat</groupId>
<artifactId>kompat-json-lib</artifactId>
<version>{version}</version>
</dependency>