An unrelated package issue (#496) steered me into looking into the current usage of the demjson3 package.
At first sight it seemed that parsing JSON was the requirement for this package.
It actually turned out that the main requirement is to handle syntax for setting options of the included JavaScript libraries (e.g. HighCharts), which are not in strict JSON but rather arbitrary JavaScript objects:
demjson3 is a fork of demjson for Python3 that meets the above requirement. The project seems to be maintained by only one contributor currently and might impose future maintainability problems.
Alternatives
The stdlib json module cannot handle JavaScript syntax, e.g. unquoted keys will cause an exception. The entire removal of this dependency is therefore not feasible.
The packages PyYAML and hjson both provide handling of JavaScript syntax and offer faster decoding performance compared to demjson3.
Motivation
An unrelated package issue (#496) steered me into looking into the current usage of the
demjson3
package.At first sight it seemed that parsing JSON was the requirement for this package. It actually turned out that the main requirement is to handle syntax for setting options of the included JavaScript libraries (e.g. HighCharts), which are not in strict JSON but rather arbitrary JavaScript objects:
vs.
demjson3
is a fork of demjson for Python3 that meets the above requirement. The project seems to be maintained by only one contributor currently and might impose future maintainability problems.Alternatives
The stdlib json module cannot handle JavaScript syntax, e.g. unquoted keys will cause an exception. The entire removal of this dependency is therefore not feasible.
The packages PyYAML and hjson both provide handling of JavaScript syntax and offer faster decoding performance compared to demjson3.
Comparison
hjson seems to be a good fit.
What is your opinion on giving it a try?