all. I'm trying to write a wrapper for a particular type of config file, which is JSON encoded. Unfortunately, this file contains C-style comments, (//
and /* */
,) and these cause errors in json.Unmarshal
. Is there a way force Unmarshal to ignore these comments, or otherwise remove them easily?
I'm looking into regexp
now, but I'm hoping there's an elegant solution that I, as a beginner in Go, might not be able to come up with in the course of a few minutes.