Yeah, Go's encoding/json will almost certainly never support json5. 
However, one very simple approach: if you're using JSON for a config file 
and just need ability to add // line comments, you can just write a simple 
transformer which reads the file line by line and filters out lines that 
start with "//" (optionally preceded by whitespace), and then send the 
result to encoding/json.

On Friday, March 18, 2022 at 1:59:21 PM UTC+13 r...@rwx.gg wrote:

> It is my sincere hope that Go will never support anything as poorly 
> designed as JSON5, using reflection is already slow enough. Comments were 
> never intended for JSON and never should be added, ever. But since most 
> discerning development shops are moving to Protobuf for everything that 
> matters, perhaps that would be less of a problem.
>
> On Monday, March 14, 2022 at 12:07:37 PM UTC-4 fliter wrote:
>
>> I need to add comments to json, but now json version does not support it
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/789fe6c3-0ce7-456a-9b96-a86aac2a849an%40googlegroups.com.

Reply via email to