Edifact format
An Edifact file consists of different objects organized hierarchically. It is read line by line, with each line corresponding to a segment.
-
Each segment consists of composites or elements.
-
A composite in turn groups together several elements.
-
An element can be associated with a code list (list of standardized codes), which functions as an enumeration listing all the possible values for that element.
-
When the element is not linked to a code list, the extracted value is directly interpreted as its actual data.
The Edifact format is therefore based on a standardized, hierarchical structure, enabling both systematic and automated reading of the information contained in the file.
An example of a line that can be read in an Edifact is:
Here, the name of the segment is “BGM”.
The character ‘ indicates the end of the segment.
Each + represents a transition to the next object, and each : indicates a transition to an internal object.
The values in this line represent the following information:
BGM BEGINNING OF MESSAGE Function: A segment by which the sender must uniquely identify the document C002 DOCUMENT NAME 1001 Document name, coded 1131 Code list qualifier 3055 Code list responsible agency, coded 1000 Document name 1004 DOCUMENT NUMBER 1225 MESSAGE FUNCTION 4343 RESPONSE TYPE
Thus, the previous example would be represented in JSON as follows: