Enum NumberSerializationMode
- Namespace
- FellowOakDicom.Serialization
- Assembly
- fo-dicom.core.dll
Defines the way DICOM numbers (tags with VR: IS, DS, SV and UV) should be serialized
public enum NumberSerializationMode
- Extension Methods
Fields
AsNumber = 0
Always serialize DICOM numbers (tags with VR: IS, DS, SV and UV) as JSON numbers. ⚠️ This will throw FormatException when a number can't be parsed! i.e.: "00081160":{"vr":"IS","Value":[76]}
AsString = 1
Always serialize DICOM numbers (tags with VR: IS, DS, SV and UV) as JSON strings. i.e.: "00081160":{"vr":"IS","Value":["76"]}
PreferablyAsNumber = 2
Try to serialize DICOM numbers (tags with VR: IS, DS, SV and UV) as JSON numbers. If not parsable as a number, defaults back to a JSON string. This won't throw an error in case a number can't be parsed. It just returns the value as a JSON string. i.e.: "00081160":{"vr":"IS","Value":[76]} or "00081160":{"vr":"IS","Value":["A non parsable value"]}