Package org.apache.wink.json4j.compat

Examples of org.apache.wink.json4j.compat.JSONWriter.endObject()


            StringWriter w = new StringWriter();
            System.setProperty("org.apache.wink.common.model.json.factory.impl", "org.apache.wink.json4j.compat.impl.ApacheJSONFactory");
            JSONFactory factory = JSONFactory.newInstance();
            JSONWriter jWriter = factory.createJSONWriter(w);
            jWriter.object();
            jWriter.endObject();
            String str = w.toString();
            // Verify it parses.
            JSONObject test = factory.createJSONObject(str);
            assertTrue(str.equals("{}"));
        }catch(Exception ex1){
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.