CCDirectLink / CCLoader

Modloader for crosscode
35 stars 11 forks source link

Support comments in JSON resources #101

Closed lexisother closed 10 months ago

elluminance commented 11 months ago

Can I suggest supporting trailing commas as well?

lexisother commented 11 months ago

Not handled by the library and out of the PR scope. At that point just replace the JSON.parse call with JSON5.parse from this library. I might do this in CCLoader3 at some point.

elluminance commented 11 months ago

The library can handle it. You have to enable it via passing in another argument. image

So you'd change it to JSON.parse(stripJsonComments(data, {trailingCommas: true}))