Search in sources :

Example 1 with JSONAware

use of net.minidev.json.JSONAware in project JsonPath by jayway.

the class IssuesTest method issue_76.

@Test
public void issue_76() throws Exception {
    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);
    jsonModel.toJSONString();
}
Also used : JSONParser(net.minidev.json.parser.JSONParser) JSONAware(net.minidev.json.JSONAware) BaseTest(com.jayway.jsonpath.BaseTest) Test(org.junit.Test)

Aggregations

BaseTest (com.jayway.jsonpath.BaseTest)1 JSONAware (net.minidev.json.JSONAware)1 JSONParser (net.minidev.json.parser.JSONParser)1 Test (org.junit.Test)1