Add conversion to JSON for NetCDF classes