EDI.Net
EDI.Net copied to clipboard
Problem when using an EDI formatted string
I am trying to use a string rather than read in and parse X12 from a file. I have verified that the string is valid by trying this with a file that contains the string. Here is what I am trying to do: var interchange = new Interchange(); using TextReader textReader = new StringReader(ediString); ... IEdiGrammar grammar = EdiGrammar.NewX12(); interchange = new EdiSerializer().Deserialize<Interchange>(textReader, grammar);
this throws an exception: "Stack Empty"
Does this tool not support passing in a string? Do I have to read from a file?
Hi @dpollackAtTpsHealthDotCom and thanks for your interest in EDI.Net,
The lib does support parsing from string but there is not enough info to see what is going on. Please make a pull request showcasing your error in a test.