File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1319,7 +1319,16 @@ void JSONIOHandlerImpl::putJsonContents(
13191319 if (it != m_jsonVals.end ())
13201320 {
13211321 auto fh = getFilehandle (filename, Access::CREATE);
1322- (*it->second )[" platform_byte_widths" ] = platformSpecifics ();
1322+
1323+ switch (m_mode)
1324+ {
1325+ case IOMode::Dataset:
1326+ (*it->second )[" platform_byte_widths" ] = platformSpecifics ();
1327+ break ;
1328+ case IOMode::Template:
1329+ break ;
1330+ }
1331+
13231332 switch (m_fileFormat)
13241333 {
13251334 case FileFormat::Json:
@@ -1329,6 +1338,7 @@ void JSONIOHandlerImpl::putJsonContents(
13291338 *fh << openPMD::json::jsonToToml (*it->second ) << std::endl;
13301339 break ;
13311340 }
1341+
13321342 VERIFY (fh->good (), " [JSON] Failed writing data to disk." )
13331343 m_jsonVals.erase (it);
13341344 if (unsetDirty)
You can’t perform that action at this time.
0 commit comments