Renegade
13th September 2023, 16:29
Hi, within ION Data flow, i create JSON file... it is a flat structure

part of Script and output below:

json_file = '''{
"Dimensions": [
{
"CompanyNumber": "",
"Dimension": "",
"DimensionType": "",
"Description": "",
"Status": "",
"StatusDescription": "",
"ActionCode": ""
}
]
}
'''

json_data = json.loads(json_file)
json_data['Dimensions'][0]['CompanyNumber'] = com
json_data['Dimensions'][0]['Dimension'] = Dim
json_data['Dimensions'][0]['DimensionType'] = Dimtyp
json_data['Dimensions'][0]['Description'] = DimDesc
json_data['Dimensions'][0]['Status'] = bloc
json_data['Dimensions'][0]['StatusDescription'] = blocdesc
json_data['Dimensions'][0]['ActionCode'] = actCode
out_json = json.dumps(json_data)

{
"Dimensions": [
{
"CompanyNumber": "1030",
"Dimension": "2500",
"DimensionType": "ig",
"Description": "jhghjg",
"Status": "1",
"StatusDescription": "Free",
"ActionCode": "Add"
}
]
}

Now the expected output is below:
{
"Dimensions": [
{"CompanyNumber": "1030"
{
"Dimension": "2500",
"DimensionType": "ig",
"Description": "jhghjg",
"Status": "1",
"StatusDescription": "Free",
"ActionCode": "Add"
}
}
]
}

How can I upgrade to this output? without having to experiment multiple libraries, many of which ION may not support. Thanks

Renegade
18th September 2023, 19:14
This is resolved

OmeLuuk
19th September 2023, 12:18
Please help others with sharing your findings as well

Renegade
25th October 2023, 12:17
I just managed to convince the other application owner to work with what I have. So, did not have to convert any further!

OmeLuuk
14th November 2023, 11:07
I just managed to convince the other application owner to work with what I have. So, did not have to convert any further!Counts as a resolution to me.:cool: