I would propose a more general solution that writes out any additional fields (besides data and metadata, which are presumably handled elsewhere) as JSON files.