For configuration files I just put in comments anyway and strip them before feeding the file to a JSON parser. (Like here: https://github.com/creshal/yspave/blob/master/yspave/pave.py... )
Hackish, but beats having to bother with YAML parsers and their regular RCE vulnerabilities.
Alas, there is a downside: The JSON spec does not allow comments, which are often important for configuration files. (Though given how much that simplifies parsing, it may have been the right decision.)
So you either omit comemnts, or end up trying to shove placeholder key-values into the closest place you can to whatever you want to comment about.