fangyidong / json-simple

A simple Java toolkit for JSON. You can use json-simple to encode or decode JSON text.
Apache License 2.0
746 stars 340 forks source link

Task :test FAILED org.json.simple.Test > testDecode #133

Closed nathanrsxtn closed 5 years ago

nathanrsxtn commented 5 years ago

Running jdk1.8.0_191 and jre1.8.0_201 on Windows 10 Home 64-bit in VS Code Building calls this error:

> Executing task: gradlew build  -Dorg.gradle.java.home="C:\Users\Public\frc2019\jdk" <

> Task :test FAILED

org.json.simple.Test > testDecode STANDARD_OUT
    =======decode=======
    ======the 2nd element of array======
    {"1":{"2":{"3":{"4":[5,{"6":7}]}}}}

    ======field "1"==========
    {"2":{"3":{"4":[5,{"6":7}]}}}

org.json.simple.Test > testDecode FAILED
    junit.framework.ComparisonFailure at Test.java:59

org.json.simple.Test > testEncode STANDARD_OUT
    =======encode=======
    ======array1==========
    ["abc\u0010a\/",123,222.123,true]

    ======obj1 with array1===========
    {"name":"fang","weight":60.21,"array1":["abc\u0010a\/",123,222.123,true],"age":27,"is_developer":true}

org.json.simple.Test > testEncode FAILED
    junit.framework.ComparisonFailure at Test.java:320

org.json.simple.parser.YylexTest > testYylex STANDARD_OUT
    "\/"
    "abc\/\r\b\n\t\f\\"
    [

    {

}

   {
    error:Unexpected character ) at position 0.
    {a : b}
    error:Unexpected character (a) at position 1.

org.json.simple.parser.YylexTest > testYylex PASSED

3 tests completed, 2 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///C:/Users/Scout-3/Documents/GitHub/2019-Hit-or-Miss/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full
insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
6 actionable tasks: 3 executed, 3 up-to-date
The terminal process terminated with exit code: 1

Here is /build/reports/tests/test/index.html: untitled

nathanrsxtn commented 5 years ago

Fixed.