8 ms·
That sounds like a very weird format. Care to post a mini-example with fake data so we can better understand what you are describing?
by pwg 9y ago
That sounds like a very weird format.
Care to post a mini-example with fake data so we can better understand what you are describing?
- pythonistic 9y agoIt sounds like an X12-style EDI format. They'll frequently have fields (or parts of fields) that can enable alternative blocks that may be of a different size. I had to write and maintain EDI interfaces for four years at a major retailer: there's a good business in transforming those documents.
- StavrosK 9y agoI guess something like: First name Last name Credit score Debtor bank Debts Bank balance but: First name Middle name Last name Credit score Bank balance So subsequent fields change depending on what fields came before. Something like that.
- phonon 9y agoThey are far from the only ones. Many times these horrible formats are covered by an NDA, so I can't even open source the parser if I wanted to :-(
- jstarfish 9y agoIt's not as weird as it sounds, you're parsing a text stream, not that much different in principle than parsing HTTP headers or network packets byte by byte.