I am trying to following this repository https://github.com/BerryWorksSoftware/edi-json everything works fine but when edifact message converted into json some curly brackets missing. This occurs because of multiple brackets in my opinion.
For an instance this is segment line where error occurs
UNB(TEST:Number(TEST:TEST(TEST(Number:Number(Number((TEST-
when edifact message generate into json it looks like this:
{
"UNB_01_SyntaxIdentifier": {
"UNB_01_01_SyntaxIdentifier": "value",
"UNB_01_02_SyntaxVersionNumber": "value"
},
"UNB_02_InterchangeSender": {
"UNB_02_01_InterchangeSenderIdentification": "value",
"UNB_02_02_IdentificationCodeQualifier": "value"
},
"UNB_03_InterchangeReceiver": {
"UNB_03_01_InterchangeReceiverIdentification": "value",
"UNB_03_02_IdentificationCodeQualifier": ""
},
"UNB_04_DateAndTimeOfPreparation": {
"UNB_04_01_Date": "value",
"UNB_04_02_Time": "value"
},
"UNB_05_InterchangeControlReference": "value",
but it missing add brackets. It would be like this
{
"UNB_01_SyntaxIdentifier": {
"UNB_01_01_SyntaxIdentifier": "value",
"UNB_01_02_SyntaxVersionNumber": "value"
},
"UNB_02_InterchangeSender": {
"UNB_02_01_InterchangeSenderIdentification": "value",
"UNB_02_02_IdentificationCodeQualifier": "value"
},
"UNB_03_InterchangeReceiver": {
"UNB_03_01_InterchangeReceiverIdentification": "value",
"UNB_03_02_IdentificationCodeQualifier": ""
},
"UNB_04_DateAndTimeOfPreparation": {
"UNB_04_01_Date": "value",
"UNB_04_02_Time": "value"
},
"UNB_05_InterchangeControlReference": "value"
}
is there any way before generating json split something you know?