Package com.alibaba.fastjson.serializer

Examples of com.alibaba.fastjson.serializer.SerializeFilter


public class Issue204 extends TestCase {

    public void test_for_issue() throws Exception {
        VO vo = new VO();
       
        SerializeFilter filter = null;
        JSON.toJSONString(vo, SerializeConfig.getGlobalInstance(), filter);
        JSON.toJSONString(vo, SerializeConfig.getGlobalInstance(), new SerializeFilter[0]);
    }
View Full Code Here


  /**
   * Method that JAX-RS container calls to serialize given value.
   */
  public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders,
      OutputStream entityStream) throws IOException, WebApplicationException {
    SerializeFilter filter = null;
    if (fastJsonConfig.serializeFilters != null)
      filter = fastJsonConfig.serializeFilters.get(type);
    String jsonStr = toJSONString(t, filter, fastJsonConfig.serializerFeatures);
    if (jsonStr != null)
      entityStream.write(jsonStr.getBytes());
View Full Code Here

TOP

Related Classes of com.alibaba.fastjson.serializer.SerializeFilter

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.