I am given a JSON array with some values being empty. Instead of null, these values are currently just empty, which makes the JSON invalid. For example:
[
"Name",
,
"card",
,
,
342,
2334,
0
]
If possible, I'm looking for a regular expression to replace the empty space with null:
[
"Name",
null,
"card",
null,
null,
342,
2334,
0
]
The new lines and indentation are not present in the actual JSON.
,,=>,null,and,]=>,null]?,,,? It would replace it with,null,,but there would still be two consecutive commas left.