Package net.sf.json

Examples of net.sf.json.JsonConfig


        /**
         * Renders HTTP response.
         */
        public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException {
            // Date needs to be converted into iso-8601 date format.
            JsonConfig config = new JsonConfig();
            config.registerJsonValueProcessor(Date.class, new JsonValueProcessor() {

                public synchronized Object processArrayValue(Object value, JsonConfig jsonConfig) {
                    if (value != null){
                       DateFormat dateFormat = new SimpleDateFormat("MMM dd yyyy HH:mm:ss 'GMT'Z", Functions.getClientLocale());
                       return dateFormat.format(value);
View Full Code Here

TOP

Related Classes of net.sf.json.JsonConfig

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.