Ason

Additional

Language
Java
Version
1.4.14 (Aug 24, 2017)
Created
Feb 4, 2017
Updated
May 3, 2018
Owner
Aidan Follestad (afollestad)
Contributor
Jan-Lukas Else (jlelse)
1
Activity
Badge
Generate
Download
Source code

Advertisement

Ason

This library intends to make JSON very easy to interact with in Java; it also makes (de)serialization painless.

It wraps around the well-known org.json classes (JSONObject, JSONArray, etc.) which also happen to be included in the Android SDK. As we all know, those stock classes tend to be a pain. They feel bulky, and make you try/catch way too many Exceptions.


Gradle (Android)

Since Android includes org.json classes, you'll want to exclude the copies provided by this library:

dependencies {
    ...
    compile('com.afollestad:ason:[latest-version]') {
        exclude group: 'org.json', module: 'json'
    }
}

Gradle (Kotlin)

In Kotlin, you'll want to exclude IntelliJ's annotations library to avoid a DexException. If you are using Kotlin with Android, make sure you also exclude org.json as shown in the section above.

dependencies {
    ...
    compile('com.afollestad:ason:[latest-version]') {
        exclude group: 'com.intellij', module: 'annotations'
    }
}

Maven

<dependency>
  <groupId>com.afollestad</groupId>
  <artifactId>ason</artifactId>
  <version>[latest-version]</version>
  <type>pom</type>
</dependency>