Package com.alibaba.json.bvt.bug

Source Code of com.alibaba.json.bvt.bug.Issue146$VO

package com.alibaba.json.bvt.bug;

import junit.framework.TestCase;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

public class Issue146 extends TestCase {

    public void test_for_issue() throws Exception {
        VO vo = new VO();
        JSON json = JSON.parseObject("{}");
        vo.setName(json);
        String s = JSON.toJSONString(vo, SerializerFeature.WriteClassName);
        System.out.println(s);
        JSON.parseObject(s);
    }

    public static class VO {

        private int    id;
        private Object name;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public Object getName() {
            return name;
        }

        public void setName(Object name) {
            this.name = name;
        }

    }
}
TOP

Related Classes of com.alibaba.json.bvt.bug.Issue146$VO

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.