Package com.alibaba.fastjson.serializer

Examples of com.alibaba.fastjson.serializer.AfterFilter


import com.alibaba.fastjson.serializer.AfterFilter;
import com.alibaba.fastjson.serializer.BeforeFilter;

public class AfterFilterTest2 extends TestCase {
    public void test_afterFilter() throws Exception {
        AfterFilter filter = new AfterFilter() {
           
            @Override
            public void writeAfter(Object object) {
                this.writeKeyValue("id", 123);
            }
View Full Code Here


        };
        Assert.assertEquals("{\"id\":123}",JSON.toJSONString( new VO(), filter));
    }
   
    public void test_afterFilter2() throws Exception {
        AfterFilter filter = new AfterFilter() {
           
            @Override
            public void writeAfter(Object object) {
                this.writeKeyValue("id", 123);
                this.writeKeyValue("name", "wenshao");
View Full Code Here

import com.alibaba.fastjson.serializer.AfterFilter;
import com.alibaba.fastjson.serializer.BeforeFilter;

public class AfterFilterTest extends TestCase {
    public void test_afterFilter() throws Exception {
        AfterFilter filter = new AfterFilter() {
           
            @Override
            public void writeAfter(Object object) {
                this.writeKeyValue("id", 123);
            }
View Full Code Here

        };
        Assert.assertEquals("{\"id\":123}",JSON.toJSONString( new VO(), filter));
    }
   
    public void test_afterFilter2() throws Exception {
        AfterFilter filter = new AfterFilter() {
           
            @Override
            public void writeAfter(Object object) {
                this.writeKeyValue("id", 123);
                this.writeKeyValue("name", "wenshao");
View Full Code Here

import com.alibaba.fastjson.serializer.AfterFilter;

public class AfterFilterTest3 extends TestCase {

    public void test_afterFilter() throws Exception {
        AfterFilter filter = new AfterFilter() {

            @Override
            public void writeAfter(Object object) {
                this.writeKeyValue("id", 123);
            }
View Full Code Here

        };
        Assert.assertEquals(JSON.toJSONString(new VO(), filter), "{\"value\":1001,\"id\":123}");
    }

    public void test_afterFilter2() throws Exception {
        AfterFilter filter = new AfterFilter() {

            @Override
            public void writeAfter(Object object) {
                this.writeKeyValue("id", 123);
                this.writeKeyValue("name", "wenshao");
View Full Code Here

TOP

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

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.