Package org.directwebremoting.json.parse

Examples of org.directwebremoting.json.parse.JsonParser


            // I'm of the opinion that allow any kind of RPC over GET without an
            // explicit @idempotent marker is probably against the HTTP spec
            // Plus there are additional security issues with GET requests
            // So I'm not rushing to fix this error
            Reader in = request.getReader();
            JsonParser parser = JsonParserFactory.get();
            calls = (JsonRpcCalls) parser.parse(in, new JsonRpcCallsJsonDecoder(converterManager, moduleManager));

            if (calls.getCallCount() != 1)
            {
                JsonRpcError error = new JsonRpcError(calls, "Non unique call", ERROR_CODE_INTERNAL, null);
                writeResponse(error, response, SC_INTERNAL_SERVER_ERROR);
View Full Code Here


     */
    public static String getErrors(Reader reader)
    {
        try
        {
            JsonParser parser = JsonParserFactory.get();
            parser.parse(reader, new IgnoreJsonDecoder());
            return null;
        }
        catch (JsonParseException ex)
        {
            return ex.toString();
View Full Code Here

     * Convert the input document into a set of basic types
     */
    @SuppressWarnings("unchecked")
    public static Map<String, Object> toSimpleObject(Reader reader) throws JsonParseException
    {
        JsonParser parser = JsonParserFactory.get();
        return (Map<String, Object>) parser.parse(reader, new SimpleJsonDecoder());
    }
View Full Code Here

     * Convert the input document into a set of basic types
     */
    @SuppressWarnings("unchecked")
    public static List<Object> toSimpleArray(Reader reader) throws JsonParseException
    {
        JsonParser parser = JsonParserFactory.get();
        return (List<Object>) parser.parse(reader, new SimpleJsonDecoder());
    }
View Full Code Here

     * Convert the input document into a set of basic types
     */
    @SuppressWarnings("unchecked")
    public static <T> T toReflectedTypes(Class<T> marshallInto, Reader reader) throws JsonParseException
    {
        JsonParser parser = JsonParserFactory.get();
        return (T) parser.parse(reader, new ReflectionJsonDecoder(marshallInto));
    }
View Full Code Here

TOP

Related Classes of org.directwebremoting.json.parse.JsonParser

Copyright © 2018 www.massapicom. 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.