jsoncpp icon indicating copy to clipboard operation
jsoncpp copied to clipboard

Trailing comma before comment in array crashes

Open jamespack opened this issue 2 years ago • 0 comments

Describe the bug Default settings_ (non strict) allows for both trailing commas and comments. However, an exception is generated on the following JSON

"actions": [
  {},
  // ...
],

To Reproduce Steps to reproduce the behavior:

  1. Minimal reproducible sample attached

TrailingCommentBug.zip

Expected behavior We expected this to be valid JSON as both the settings seem to allow for it.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows

Additional context Add any other context about the problem here.

jamespack avatar Jul 10 '23 11:07 jamespack