package com.alibaba.fastjson.deserializer.issue3804;
import com.alibaba.fastjson.JSONValidator;
import org.junit.Test;

public class TestIssue3804 {
    @Test
    public void testIssue3804() {
        String textResponse="{\"error\":false,\"code\":0}";
        JSONValidator validator = JSONValidator.from(textResponse);
        if (validator.validate() && validator.getType() == JSONValidator.Type.Object) {
            System.out.println("Yes, it is Object");
        } else {
            System.out.println("No, it is not Object");
        }
    }
}

@@ -194,16 +194,18 @@
         
+//
 String t
@@ -248,16 +248,71 @@
 %5C%22:0%7D%22;%0A
+        String textResponse=%22%7B%5C%22error%5C%22:false,%5C%22code%22;%0A
         

add testcase