Here you can find the source of toDouble(Object input)
public static Double toDouble(Object input)
//package com.java2s; /* Copyright (c) 2017 Boundless and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Distribution License v1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/org/documents/edl-v10.html * * Contributors:/*from w w w . j a v a 2 s . co m*/ * Erik Merkle (Boundless) - initial implementation * Gabriel Roldan (Boundless) - refactored from TestData to its own class */ import javax.json.JsonNumber; public class Main { public static Double toDouble(Object input) { return ((JsonNumber) input).doubleValue(); } }