package com.alibaba.json.bvt.bug;

import junit.framework.TestCase;

import com.alibaba.fastjson.JSON;

public class Bug_for_huling extends TestCase {

    public void test_for_objectKey() throws Exception {
        String text = "\0\0";
        System.out.println("A" + JSON.toJSONString(text) + "B");

    }

    public static class Address {

        private String city;
        private String street;
        private int postCode;

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getStreet() {
            return street;
        }

        public void setStreet(String street) {
            this.street = street;
        }

        public int getPostCode() {
            return postCode;
        }

        public void setPostCode(int postCode) {
            this.postCode = postCode;
        }

    }
}

@@ -28,16 +28,47 @@
 t.bug;%0A%0A
+import junit.framework.Assert;%0A
 import j
@@ -244,547 +244,442 @@
     
-String text = %22%5C0%5C0%22;%0A        System.out.println(%22A%22 + JSON.toJSONString(text) + %22B
+VO vo = new VO();%0A        vo.setValue(%22%5C0%5C0
 %22);%0A
-%0A
     
-%7D%0A%0A
     
-public static class Address %7B%0A%0A        private String city;%0A        private String street;%0A        private int postCode;%0A%0A        public String getCity() %7B%0A            return city;%0A        %7D%0A%0A        public void setCity(String city) %7B%0A            this.city = city;%0A        %7D%0A%0A        public String getStreet() %7B%0A            return street
+%0A        Assert.assertEquals('%5C0', vo.getValue().charAt(0));%0A        %0A        String text = JSON.toJSONString(vo);%0A        System.out.println(text);%0A        Assert.assertEquals(%22%7B%5C%22value%5C%22:%5C%22%5C0%5C0%5C%22%7D%22, text);%0A%0A        VO vo2 = JSON.parseObject(text, VO.class);%0A        Assert.assertEquals(%22%5C0%5C0%22, vo2.getValue())
 ;%0A    
- 
-   
 %7D%0A%0A    
-  
-  
 public 
-void setStreet(String street) %7B%0A            this.street = street;%0A        %7D
+static class VO %7B%0A%0A        private String value;
 %0A%0A  
@@ -695,22 +695,22 @@
 lic 
+Str
 in
-t
+g
  get
-PostCod
+Valu
 e() 
@@ -730,23 +730,20 @@
  return 
-postCod
+valu
 e;%0A     
@@ -775,28 +775,25 @@
  set
-PostCode(int postCod
+Value(String valu
 e) %7B
@@ -814,26 +814,20 @@
 his.
-postCode = postCod
+value = valu
 e;%0A 

add test