skyscreamer/JSONassert

Should consider the JSON to be invalid when adding a "," after a closing object tag in an array of objects

AElMehdi opened this issue · 4 comments

The following example should be considered as an invalid JSON, yet it passes and is seen as if we have 2 values in the array.

   "id": 1,
   "props": [
      {
         "id": 1,
         "propB": true
      },
   ],
   "propC": false
} 

It returns the following error:
java.lang.AssertionError: props[]: Expected 1 values but got 2

It can be linked to the following issue.

I would like to try to work on this issue.

@AElMehdi I think it is caused by the first character is """. So this json lib will parse it as JSONString. Maybe I will solve this bug.

@Crayon-new Cool! Have fun! :)

I would like to work on this issue