9 releases

0.3.0 Jun 10, 2024
0.2.0 Jul 9, 2020
0.1.3 Jan 15, 2020
0.1.2 Oct 8, 2019
0.0.3 Oct 7, 2019

#1038 in Parser implementations

Download history 96/week @ 2024-07-25 83/week @ 2024-08-01 59/week @ 2024-08-08 37/week @ 2024-08-15 58/week @ 2024-08-22 57/week @ 2024-08-29 52/week @ 2024-09-05 61/week @ 2024-09-12 51/week @ 2024-09-19 67/week @ 2024-09-26 80/week @ 2024-10-03 94/week @ 2024-10-10 72/week @ 2024-10-17 33/week @ 2024-10-24 43/week @ 2024-10-31 31/week @ 2024-11-07

194 downloads per month

Custom license

55KB
1K SLoC

docs.rs crates.io Build Status

Overview

Check the documentation for more details.

A quick summary of features

  • Provides two top-level parsing functions: parse and loose_parse. loose_parse is less strict on the format of the incoming EDI document.
  • Parses a valid X12 EDI document into a struct called EdiDocument.
  • Provides verbose error messages if the document being parsed is invalid.
    • Error messages include the actual segment in which the error occurred.
  • EdiDocument and all data it contains implement Serialize and Deserialize from serde, so zero-copy serialization and deserialization to any serde-able format is supported (this includes json).
  • EdiDocument's fields are all public and it can be navigated like any other struct for simplicity

See the examples directory for an example.

A quick summary of limitations

  • Cannot accurately determine segment types, as that requires an implementation guide from the individual transactor
  • Cannot detect loops for the same reason as above
  • Only supports standard X12 EDI

Dependencies

~1.4–2.2MB
~32K SLoC