Closed wongjasont closed 4 years ago
@wongjasont The design decision was made to omit from the JSON format since the trailers are made to verify the contents, and simply represent the counts and corresponding ID. In JSON, we can tell the IDs, the number of segments in a transaction, the number of transactions, and the number of functional groups by either inspecting the arrays or calling length
in most languages. From my perspective, it serves no purpose to include trailers due to this information already existing in the JSON format.
Can you explain further the need for trailers in JSON? Perhaps a use case?
You are also welcome to submit a pull request that implements the trailers.
@wongjasont Since I have received no response, in the last 4 months, I'll be closing this as won't fix. If you can provide a suitable use-case, I'll be happy to review the decision.
Describe the bug After parsing a valid EDI file, the X12Interchange object can be seen with a trailers attribute but if .toJSON() or .toJSEDINotation() is called, the resulting object only contains headers and no trailers
To Reproduce
Expected behavior Trailers should be included in the resulting JSON
Environment (please complete the following information):