RJOSN parsers and formatters for Java and Kotlin.
http://www.relaxedjson.org/docs/api
RJSON Parser and Formatter (Latest Snapshots)
repositories {
maven('https://oss.sonatype.org/content/repositories/snapshots')
}
compile 'tv.twelvetone.rjson:rjson:1.3.0-SNAPSHOT'
repositories {
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
}
compile("tv.twelvetone.rjson:rjson:1.3.0-SNAPSHOT")
<repository>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<dependency>
<groupid>tv.twelvetone.rjson</groupid>
<artifactid>rjson</artifactid>
<version>1.3.0-SNAPSHOT</version>
</dependency>
To run the demo project, go to the demo directory and type.
./gradlew test
build.gradle.kts
plugins {
`java`
}
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
dependencies {
testCompile(tv.twelvetone.rjson:rjson:1.0-SNAPSHOT")
testCompile("junit:junit:4.12")
}
TestRjsonParser.java
import org.junit.Assert;
import org.junit.Test;
import tv.twelvetone.json.JsonValue;
import tv.twelvetone.rjson.RJsonParserFactory;
public class TestRjsonParser {
@Test
public void testRsjonParser() {
JsonValue parsed = new RJsonParserFactory().createParser().stringToValue("{hello:world}");
Assert.assertEquals("{\"hello\":\"world\"}", parsed.toString());
}
}