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

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

Introduction

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

Prototype

public int getValueAsInt(int defaultValue) throws IOException, JsonParseException 

Source Link

Document

Method that will try to convert value of current token to a int.

Usage

From source file:com.codepine.api.testrail.internal.IntToBooleanDeserializer.java

@Override
public Boolean deserialize(JsonParser jp, DeserializationContext ctxt)
        throws IOException, JsonProcessingException {
    return jp.getValueAsInt(0) <= 0 ? Boolean.FALSE : Boolean.TRUE;
}