mirror of
https://github.com/chenasraf/vstask.git
synced 2026-05-18 01:39:04 +00:00
13 lines
267 B
Go
13 lines
267 B
Go
package utils
|
|
|
|
import "github.com/tailscale/hujson"
|
|
|
|
func ConvertJsoncToJson(jsonc []byte) []byte {
|
|
std, err := hujson.Standardize(jsonc) // strips comments & trailing commas
|
|
if err != nil {
|
|
// fall back to original on parse error
|
|
return jsonc
|
|
}
|
|
return std
|
|
}
|