You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import JSON5 from "json5";
|
|
|
|
export function parseJsonWithJson5Fallback(raw: string): unknown {
|
|
try {
|
|
return JSON.parse(raw);
|
|
} catch {
|
|
return JSON5.parse(raw);
|
|
}
|
|
}
|