3 ms·
Hello there, author here. I just finished making this tiny parser for JSON with comments and optional trailing commas. Writing it was pretty enjoyable and I'm f
by fabiospampinato 6y ago
Hello there, author here. I just finished making this tiny parser for JSON with comments and optional trailing commas. Writing it was pretty enjoyable and I'm fairly satisfied with the result.
I'm sharing it here partially because some of you may find it useful and partially because I'd also like to personally see more of these kinds of performance-oriented JS submissions on HN so I wanted to contribute in that regard too.
- chovybizzass 6y agoso the only benefit is comments and trailing comments? A linter will rip all that out anyway
- fabiospampinato 6y agoCompared to JSON you mean? Yeah that's the only difference behavior-wise. It'd be stupid to run a full-blown linter on user-provided JSON settings for this for example, so there are some use cases where something like this is useful.