List of usage examples for javax.json JsonNumber bigDecimalValue
BigDecimal bigDecimalValue();
From source file:com.buffalokiwi.aerodrome.jet.Utils.java
public static BigDecimal getJsonNumber(final JsonNumber n) { final BigDecimal b = new BigDecimal(0); if (n == null) return b; return n.bigDecimalValue(); }
From source file:com.buffalokiwi.aerodrome.jet.Utils.java
public static BigDecimal jsonNumberToBigDecimal(final JsonNumber n, final int defaultValue) { if (n == null) return new BigDecimal(defaultValue); return n.bigDecimalValue(); }
From source file:org.btc4j.daemon.BtcJsonRpcHttpClient.java
public BigDecimal jsonDouble(JsonObject object, String key) throws BtcException { JsonNumber number = object.getJsonNumber(key); return (number == null) ? BigDecimal.ZERO : number.bigDecimalValue(); }