First draft of legend generator.
Finish first version of JsonLegend, not activated in Makefile.