Feature/json exporter

A quick first pass at a JSON exporter. Would welcome some feedback around which fields are required, useful, etc.

For #5343

Note that this hasn't touched the XML export functionality at all.
Can we just drop everything related to the old XML user exporter? A community decision already accepted XML as the new format, the old one doesn't really work anyway.

Objections anyone?