Created attachment 270572 [details] Screenshot The following JSON: {"someNegativeNumbers":[-8,-6,-3]} is prettified as: { "someNegativeNumbers": [ - 8, - 6, - 3] } Note the space between the "-" and the actual number value. This prettified JSON is invalid.
Created attachment 270573 [details] Testcase
Created attachment 270574 [details] Supporting resource for test case
<rdar://problem/24480111>
<rdar://problem/24480103>
Yep, this was a known issue with the JavaScript pretty printer. CodeMirror used to tokenize -/+ as part of the number and then stopped. One pro is that it now sees this as an operator that we can reason about, on the minus side we weren't reasoning about it very carefully. Basically always treating +/- as binary operators. I have a hack that makes an effort to better handle unary numbers. I saw no performance regression.
*** This bug has been marked as a duplicate of bug 134007 ***