antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

[feature] Support JSON with comments #210

Closed hedhyw closed 1 year ago

hedhyw commented 2 years ago

Description

Support JSON with comments as an input:

{  /* The most popular text.  */
  "hello": "world" // My first JSON.
}

Why?

Comments improve readability, but unfortunately, it is not a valid JSON.

How?

The perfect case is to have the ability to see comments in the input, but it is not easy to implement so fast.

So I propose, to just remove comments if some flag is provided.

And use, for example: jsoncjson.NewReader(...) in main.go#L95 and main.go#L99

antonmedv commented 2 years ago

I can work on implementing full support of JSON with comments. $1000 😁

YashishDua commented 2 years ago

@antonmedv Did you get the bucks to start this? I can work along you on this.

antonmedv commented 2 years ago

Nope) feel free to implement)

antonmedv commented 1 year ago

Now fx suppoers it.