Here you can find the source of bigDecimaltoJSONString(Object obj)
Parameter | Description |
---|---|
obj | , a number |
public static String bigDecimaltoJSONString(Object obj)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { /**//from w w w. j a v a 2 s . c om * bigDecimaltoJSONString * * @param obj * , a number * @return str, a line of JSON code representing obj * @pre Object obj, a BigDecimal * @post Returns the corresponding JSONString for obj. */ public static String bigDecimaltoJSONString(Object obj) { BigDecimal number = (BigDecimal) obj; return number.toString(); } }