Package org.amplafi.json

Examples of org.amplafi.json.JSONObject.asMap()


        assertEquals(outMap.get("foo"), inMap.get("foo"));
        assertEquals(outMap.get("str"), inMap.get("str"));

        // we can't know that the nested map should be interpreted as a map.
        JSONObject actual = (JSONObject) outMap.get("bar");
        assertEquals(actual.asMap(), inMap.get("bar"));
    }

    @SuppressWarnings("unchecked")
    @Test
    public void testBasic() {
View Full Code Here


     * @see org.amplafi.json.JsonRenderer#fromJson(java.lang.Class, java.lang.Object, Object...)
     */
    @Override
    public <K> K fromJson(Class<K> clazz, Object value, Object... parameters) {
        JSONObject jsonObject = JSONObject.toJsonObject(value);
        return (K) jsonObject.asMap();
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.