Examples of JSONSerializer


Examples of flexjson.JSONSerializer

    }

    private void returnJSON(HttpServletResponse response,
            List<EPersonDTO> epersons) throws IOException
    {       
        JSONSerializer serializer = new JSONSerializer();
        serializer.rootName("epersons");
        serializer.exclude("class");
        response.setContentType("application/json");
        serializer.deepSerialize(epersons, response.getWriter());
    }
View Full Code Here

Examples of flexjson.JSONSerializer

        {
            info.setActive(rp.getStatus() != null ? rp.getStatus() : false);
            info.setUrl("/cris/" + rp.getPublicPath() + "/"
                    + ResearcherPageUtils.getPersistentIdentifier(rp));
        }
        JSONSerializer serializer = new JSONSerializer();
        serializer.rootName("myrp");
        serializer.exclude("class");
        response.setContentType("application/json");
        serializer.deepSerialize(info, response.getWriter());
    }
View Full Code Here

Examples of flexjson.JSONSerializer

        Response resp = new Response();
        resp.setRelatedObjects(relatedObjects.getObjects());
        resp.setiTotalRecords(relatedObjects.getTotalRecords());
        resp.setiTotalDisplayRecords(relatedObjects.getFilterRecords());
        resp.setsEcho(sEcho);
        JSONSerializer serializer = new JSONSerializer();
        serializer.exclude("class", "objects.class");
        serializer.deepSerialize(resp, response.getWriter());
        response.setContentType("application/json");
        return null;
    }
View Full Code Here

Examples of flexjson.JSONSerializer

                return "file not found!";
            }
        }
        else if (propertyName.equals(TOKEN_MAP))
        {
            return new JSONSerializer().serialize(storageService.getStringEndpointMap());
        }
        else if (propertyName.equals("version"))
        {
            return Constants.VERSION;
        }
View Full Code Here

Examples of flexjson.JSONSerializer

                return "file not found!";
            }
        }
        else if (propertyName.equals(TOKEN_MAP))
        {
            return new JSONSerializer().serialize(storageService.getStringEndpointMap());
        }
        else if (propertyName.equals("version"))
        {
            return Constants.VERSION;
        }
View Full Code Here

Examples of flexjson.JSONSerializer

  public void setLikeNum(int likeNum) {
    this.likeNum = likeNum;
  }

  public String toJson() {
    return new JSONSerializer().exclude("*.class").deepSerialize(this);
  }
 
View Full Code Here

Examples of flexjson.JSONSerializer

    return new JSONDeserializer<ImageContent>().use(null,
        ImageContent.class).deserialize(json);
  }

  public static String toJsonArray(Collection<ImageContent> collection) {
    return new JSONSerializer().exclude("*.class")
        .deepSerialize(collection);
  }
 
View Full Code Here

Examples of net.sf.sojo.interchange.json.JsonSerializer

     *
     * @see de.netseeker.ejoe.adapter.SerializeAdapter#read(java.io.InputStream)
     */
    public Object read( InputStream in ) throws Exception
    {
        JsonSerializer serializer = new JsonSerializer();
        String json = (String) super.read( in );
        return serializer.deserialize( json );
    }
View Full Code Here

Examples of net.sf.sojo.interchange.json.JsonSerializer

     *
     * @see de.netseeker.ejoe.adapter.SerializeAdapter#write(java.lang.Object, java.io.OutputStream)
     */
    public void write( Object obj, OutputStream out ) throws Exception
    {
        JsonSerializer serializer = new JsonSerializer();
        super.write( serializer.serialize( obj ), out );
    }
View Full Code Here

Examples of org.apache.ambari.server.api.services.serializers.JsonSerializer

    return getHttpBodyParser().parse(getHttpBody());
  }

  @Override
  public ResultSerializer getResultSerializer() {
    return new JsonSerializer();
  }
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.