EDI.Net
EDI.Net copied to clipboard
Revisit the formatting and the PICTURE syntax.
either fully support the cobol picture syntax as described here and there, or maybe map to a dotnet friendly alternative like implementing the IFormatProvider and ICustomFormatter interfaces and using string.Format.
Some more insight on this. The picture syntax as far as the EDI is concerned is a form of format string, meaning that it could be used for one of two things.
- Validating the incoming transmission component values
- When serializing it can used as a format mask (similar to what
#,##0.00is to formatting numbers in dotnet). Check the issue #20 when reading numeric values. There are some cases of incoming transmissions where integers and floats are padded with leadingZcharacters instead ofwhitespaceor zeros0which is the common case in dotnet.