D
D
Dmitry2020-11-12 22:14:09
JavaScript
Dmitry, 2020-11-12 22:14:09

How to make invalid json valid?

I get invalid json with comments, something like this:

{
"version": "1",              //version maker,
 /** DATA **/
}

How to make such 'json' valid? Maybe there is some library? I don't even know how to parse this with regulars.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2020-11-12
@Tim308

It's called json5 . Use some thread ready for parsing and you will be happy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question