Package org.amplafi.json

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


            a = new JSONArray("[2147483647, 2147483648, 9223372036854775807, 9223372036854775808]");
            System.out.println(a.toString(4));

            System.out.println("\nKeys: ");
            it = j.keys().iterator();
            while (it.hasNext()) {
                s = (String)it.next();
                System.out.println(s + ": " + j.getString(s));
            }
View Full Code Here


    @SuppressWarnings("unchecked")
    @Override
    protected Map<? extends K, ? extends V> doDeserialize(FlowPropertyProvider flowPropertyProvider, FlowPropertyDefinition flowPropertyDefinition, DataClassDefinition dataClassDefinition, Object serializedObject) {
        JSONObject jsonObject = JSONObject.toJsonObject(serializedObject);
        Map<K, V> map = new LinkedHashMap<K, V>();
        for(String key : jsonObject.keys() ) {
            Object object = jsonObject.get(key);
            DataClassDefinition keyDataClassDefinition = dataClassDefinition.getKeyDataClassDefinition();
            K realKey = (K) keyDataClassDefinition.deserialize(flowPropertyProvider, flowPropertyDefinition, key);
            DataClassDefinition elementDataClassDefinition = dataClassDefinition.getElementDataClassDefinition();
            V realValue = (V) elementDataClassDefinition.deserialize(flowPropertyProvider, flowPropertyDefinition, object);
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.