While working out a solution for this problem:
I discovered that I can derive from juce::DynamicObject and provide an implementation of the writeAsJSON member function.
The DynamicObject::writeAsJSON function internally uses JSONFormatter.
I am duplicating this function because the only things I need to change are removing the space after the ": " and forcing the output to be on a single line.
Unfortunately, juce::JSONFormatter is defined in juce__JSON.cpp, and is therefore not a class that we can freely use in our projects.
The only solution to be able to use JSONFormatter is to copy/paste this class into source files that I control.
