posix4e / json-smart

Automatically exported from code.google.com/p/json-smart
1 stars 0 forks source link

RuntimeException in JSONAware.toJSONString() #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

        String json = "{\n" +
                "    \"cpus\": -8.88178419700125e-16,\n" +
                "    \"disk\": 0,\n" +
                "    \"mem\": 0\n" +
                "}";

        JSONParser parser = new JSONParser(JSONParser.MODE_PERMISSIVE);
        JSONAware jsonModel = (JSONAware)parser.parse(json);

//java.lang.RuntimeException: no Getter for field scale in class 
java.math.BigDecimal
        jsonModel.toJSONString(); 

What is the expected output? What do you see instead?

{
    "cpus": -8.88178419700125e-16,
    "disk": 0,
    "mem": 0
}

What version of the product are you using?
2.1.1

On what operating system?
Mac OS X

Please provide any additional information below.

Original issue reported on code.google.com by kalle.st...@gmail.com on 28 Mar 2015 at 12:58

GoogleCodeExporter commented 9 years ago
Fixed in V 2.2

Original comment by uriel.chemouni on 29 Jul 2015 at 2:32