Example usage for com.badlogic.gdx.utils JsonValue isValue

List of usage examples for com.badlogic.gdx.utils JsonValue isValue

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils JsonValue isValue.

Prototype

public boolean isValue() 

Source Link

Document

Returns true if this is not an array or object.

Usage

From source file:com.ahsgaming.valleyofbones.Utils.java

License:Apache License

public static Array<Object> jsonAsArray(JsonValue json) {
    Array<Object> returnVal = new Array<Object>();
    for (JsonValue v : json) {
        returnVal.add((v.isValue() ? v.asString() : (v.isObject() ? v : jsonAsArray(v))));
    }/*from w  w w. j ava2  s  . c om*/
    return returnVal;
}