Is there a good yaml library for Android?

I do not think you can use SnakeYaml on Android without modifications (at least now).

By default, SnakeYaml uses Introspector to get PropertyDescriptors for classes, and as I can see java.beans.Introspector is not available on Android. But there is BeanAccess.FEILD mode in the SnakeYaml which uses fields to dump/load beans. That mode uses only java.lang.reflect classes available on Android.

So, with some modifications it might work. But I need to try it to be sure.

Added

Now android compatible version of SnakeYaml can be build using :

mvn -Pandroid clean package

Update (March 2017):

Starting from 1.18 android build is in central. You can add dependency into your pom.xml like this

<dependency>
  <groupId>org.yaml</groupId>
  <artifactId>snakeyaml</artifactId>
  <version> VERSION </version>
  <classifier>android</classifier>
</dependency>

or in your build.gradle like this:

implementation "org.yaml:snakeyaml:1.18:android"

Tags:

Java

Android

Yaml