Examples of ObjectMatch


Examples of org.sf.bee.commons.remoting.jrpc.serializer.ObjectMatch

            throw new UnmarshallException("map missing", e);
        }
        if (jsonmap == null) {
            throw new UnmarshallException("map missing");
        }
        ObjectMatch m = new ObjectMatch(-1);
        state.setSerialized(o, m);

        Iterator i = jsonmap.keys();
        String key = null;
        try {
            while (i.hasNext()) {
                key = (String) i.next();
                m.setMismatch(_ser.tryUnmarshall(state, null, jsonmap.get(key)).max(m).getMismatch());
            }
        } catch (UnmarshallException e) {
            throw new UnmarshallException("key " + key + " " + e.getMessage(), e);
        } catch (JSONException e) {
            throw new UnmarshallException("key " + key + " " + e.getMessage(), e);
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.ObjectMatch

        if (jsonset == null) {
            throw new UnmarshallException("set missing");
        }

        ObjectMatch m = new ObjectMatch(-1);
        state.setSerialized(o, m);
        Iterator i = jsonset.keys();
        String key = null;

        try {
            while (i.hasNext()) {
                key = (String) i.next();
                m.setMismatch(_ser.tryUnmarshall(state, null, jsonset.get(key)).max(m).getMismatch());
            }
        } catch (UnmarshallException e) {
            throw new UnmarshallException("key " + key + " " + e.getMessage(), e);
        } catch (JSONException e) {
            throw new UnmarshallException("key " + key + " " + e.getMessage(), e);
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.ObjectMatch

        return o;
    }

    public ObjectMatch tryUnmarshall(SerializerState state, Class clazz,
            Object jso) throws UnmarshallException {
        final ObjectMatch toReturn;
        if (jso instanceof String) {
            // TODO: Boolean parses stuff as ignoreCase(x)=="true" as true or
            // anything else as false. I'm pretty sure in this case it this should
            // only be javascript true or false strings, because otherwise
            // this will catch string passed to it.
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.ObjectMatch

            throw new UnmarshallException("Could not read map: " + e.getMessage(), e);
        }
        if (jsonmap == null) {
            throw new UnmarshallException("map missing");
        }
        ObjectMatch m = new ObjectMatch(-1);
        Iterator i = jsonmap.keys();
        String key = null;
        state.setSerialized(o, m);
        try {
            while (i.hasNext()) {
                key = (String) i.next();
                m.setMismatch(_ser.tryUnmarshall(state, null, jsonmap.get(key)).max(m).getMismatch());
            }
        } catch (UnmarshallException e) {
            throw new UnmarshallException("key " + key + " " + e.getMessage(), e);
        } catch (JSONException e) {
            throw new UnmarshallException("key " + key + " " + e.getMessage(), e);
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.ObjectMatch

        }
        if (jsonlist == null) {
            throw new UnmarshallException("list missing");
        }
        int i = 0;
        ObjectMatch m = new ObjectMatch(-1);
        state.setSerialized(o, m);
        try {
            for (; i < jsonlist.length(); i++) {
                m.setMismatch(_ser.tryUnmarshall(state, null, jsonlist.get(i)).max(m).getMismatch());
            }
        } catch (UnmarshallException e) {
            throw new UnmarshallException("element " + i + " " + e.getMessage(), e);
        } catch (JSONException e) {
            throw new UnmarshallException("element " + i + " " + e.getMessage(), e);
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.ObjectMatch

    public ObjectMatch tryUnmarshall(SerializerState state, Class clazz, Object o)
            throws UnmarshallException {
        JSONArray jso = (JSONArray) o;
        Class cc = clazz.getComponentType();
        int i = 0;
        ObjectMatch m = new ObjectMatch(-1);
        state.setSerialized(o, m);
        try {
            for (; i < jso.length(); i++) {
                m.setMismatch(_ser.tryUnmarshall(state, cc, jso.get(i)).max(m).getMismatch());
            }
        } catch (UnmarshallException e) {
            throw new UnmarshallException("element " + i + " " + e.getMessage(), e);
        } catch (JSONException e) {
            throw new UnmarshallException("element " + i + " " + e.getMessage() + " not found in json object", e);
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.