EDI.Net
EDI.Net copied to clipboard
The attached EDI definition/class does not serialize and deserialize to the same object(s).
Hey All, I have a class that I really need to Serialize and Deserialize to the same objects. Unfortunately, as I have things now it serializes to a correctly formed edi file (that is at least accepted by the receiver that I'm sending to), but it does not deserialize to the same object(s). Any help would be greatly appreciated. Sorry I can't provide an example (in public) of the serialized files, especially since I can't deserialize the file to write code to sanitize it. TaxFiling_813_cs.txt d.
Hi @codewg
Without a transmission and even a failing test the models are not helpful by themselves. I am in no way familiar with the vast majority of the EDI transmission types available out there.
That said since you cannot sanitize your transmission you could generate a test (through a pull request) using one example found online
- appendix H from this pdf
- https://www.in.gov/dor/files/ftediguide.pdf page 56
Ok, attached is an Example taken from an online EDI similar to the ones you posted, but not the same ones. This example has the same Deserialization issue as my actual messages.
So I tried 'from scratch' to recreate the class following as closely to the only edi guide as possible and I have a new class, which comes seemingly closer but still does not result in N1 loop and FGS loop getting read in. This new class is, also, attached.
First, because the original/first class is what I have been using to serialize, I'd like it fixed. Since I like the new class better, and feel like it is more 'proper' form would as time allows like to fix the N1 and FGS loop issue, that way I could move/migrate to the new class, which I think is truly better on a lot of grounds.
I guess I'd have more/better luck if I dug into the code, or looked at the other test cases to see how the different decorators are used.... Again, any help would be very greatly appreciated. Thanks.