@SuppressWarnings({"unchecked", "rawtypes"})
    public <T> T deserialize(Object object, Type type) {

        Map<Object, Object> map = createMap(type);

        if (object instanceof Map) {
            for (Map.Entry<Object, Object> entry : map.entrySet()) {
                map.put(entry.getKey(), entry.getValue());
            }
            return (T) map;
        }

        if (object instanceof JSONObject) {
            JSONObject json = (JSONObject) object;
            for (Map.Entry<String, Object> entry : json.entrySet()) {
                map.put(entry.getKey(), entry.getValue());
            }
            return (T) map;
        }
        throw new JSONException("illegal object class:" + object.getClass() + " type:" + type);
    }
@author Robert HG (254963746@qq.com) on 12/30/15.
lts-core/src/main/java/com/github/ltsopensource/json/deserializer/MapDeserializer.java