Ason

General

Category
Free
Tag
JSON
License
Apache License, Version 2.0
Registered
Feb 18, 2017
Favorites
5
Link
https://github.com/afollestad/ason
See also
DSL JSON
JsonSurfer
Stag
Jackson jr
kraph

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

Advertising

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>