Example usage for com.fasterxml.jackson.core JsonParser getBooleanValue

List of usage examples for com.fasterxml.jackson.core JsonParser getBooleanValue

Introduction

In this page you can find the example usage for com.fasterxml.jackson.core JsonParser getBooleanValue.

Prototype

public boolean getBooleanValue() throws IOException, JsonParseException 

Source Link

Document

Convenience accessor that can be called when the current token is JsonToken#VALUE_TRUE or JsonToken#VALUE_FALSE .

Usage

From source file:org.hippoecm.frontend.service.restproxy.custom.json.deserializers.AnnotationJsonDeserializer.java

protected Boolean[] deserializeBooleanArrayAnnotationAttribute(JsonParser jsonParser)
        throws JsonParseException, IOException {
    List<Boolean> booleanArray = new ArrayList<Boolean>();

    while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
        booleanArray.add(jsonParser.getBooleanValue());
    }/*from  w w  w  . ja  v a  2s .  c o  m*/

    return booleanArray.toArray(new Boolean[booleanArray.size()]);
}