This is tracking a feature request from @phisanti (that I also think is a good idea) for exporting as much metadata as we can gather in the ome_types.OME object that we export from ND2File.ome_metadata().
MapAnnotation/Value children must all be M and the value of M must be a plain string... this means that nested dicts are not allowed.
related to the first point, we can only pass strings or other things that can be cast to strings (like integers) as a value. So all of the array values in the unstructured metadata are also not allowed.
So, I think we either have to just dump it all into a single json string, or do a ton of value checking and either exclude or selectively cat to json the stuff that the OME model doesn't take naturally.
This is tracking a feature request from @phisanti (that I also think is a good idea) for exporting as much metadata as we can gather in the
ome_types.OME
object that we export fromND2File.ome_metadata()
.However, while https://github.com/tlambert03/ome-types/pull/249 does make this a bit easier... we still have issues because:
M
and the value of M must be a plain string... this means that nested dicts are not allowed.So, I think we either have to just dump it all into a single json string, or do a ton of value checking and either exclude or selectively cat to json the stuff that the OME model doesn't take naturally.