@Test
    public void test_for_issue_3() throws Exception {
        Exception error = null;
        try {
            HashMap origin = new HashMap();
            origin.put(new Date(), "value");
            JSONArray jsonArray = new JSONArray().fluentAdd(origin);
            jsonArray.getJSONObject(0);
            // now jsonArray is [{154xxxxxxxxx:"value"}]
            assertEquals(1, jsonArray.getJSONObject(0).size());
        } catch (JSONException ex) {
            error = ex;
        }
        assertNull(error);
    }
To prove casting from Map&lt;Date, Object&gt; won't cause exception

@throws Exception
fastjson1-compatible/src/test/java/com/alibaba/fastjson/issue_2100/Issue2185.java