Appendium / flatpack

CSV/Tab Delimited and Fixed Length Parser and Writer
http://flatpack.sf.net
Apache License 2.0
57 stars 20 forks source link

Parser needs to have file layout validation api #30

Open avikadam opened 7 years ago

avikadam commented 7 years ago

There are scenarios for me where i need to make file should meeting specified layout.

e.g. I have fixed width file with records structured in Header-Detail-Trailer format. So parser should give me error if source file doesn't follow this format.

Is there any plan to add such layout validations? I have written one custom file layout validator on top of parser code.

Thanks in advance!

-Avinash

benoitx commented 7 years ago

Hi

That sounds interesting.

I assume that it is written as an interface which could be passed a Writer? And the writer is used if the request is valid?

So no code would need to change, it would be a new interface and a new type of Writer that does validation and then delegates writing to the original Writer?

That would be good 😊


Important Notice This communication contains information that is considered confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and delete the original

On 3 May 2017, at 13:43, Avinash notifications@github.com wrote:

There are scenarios for me where i need to make file should meeting specified layout.

e.g. I have fixed width file with records structured in Header-Detail-Trailer format. So parser should give me error if source file doesn't follow this format.

Is there any plan to add such layout validations? I have written one custom file layout validator on top of parser code.

Thanks in advance!

-Avinash

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.