indice-co / indice-co/EDI.Net

Problem when using an EDI formatted string

Open
#177 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

more-info-needed
Dominant language
C#
Stars
490
Forks
173
PR merge metrics
No merged PRs in 30d

Description

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(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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the EdiSerializer.Deserialize call shown in the issue and reproduce it using the provided StringReader approach with the same valid X12 content. Compare the string-based behavior with file-based deserialization; done means the supported input path no longer throws "Stack Empty", or the limitation and required usage are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.