New update results are different from the old version
sanjay-rendu opened this issue · 9 comments
I have two rows with same key value "edata_eks_timeSpent_ss" but only one of them is part of the final result! The other row which had "TaskNumber": 1 in the sheet is missing.
{
"edata_eks_timeSpent_ss": {
"FeatureName": "edata_eks_timeSpent_ss",
"TaskName": "Unit Conversion",
"Options": "frm = 'seconds',\nto = 'minutes'",
"Type": "Numeric",
"TaskNumber": 2
}
}
Do you have Nested Elements enabled?
Are you trying to get an array with each row as an element? Or something else?
I was expecting an output like this from the sheet
{
"edata_eks_timeSpent_ss": {
"FeatureName": "edata_eks_timeSpent_ss",
"TaskName": "Clip",
"Options": "lower = 0,\nupper = 600",
"Type": "Numeric",
"TaskNumber": 1
},
"edata_eks_timeSpent_ss": {
"FeatureName": "edata_eks_timeSpent_ss",
"TaskName": "Unit Conversion",
"Options": "frm = 'seconds',\nto = 'minutes'",
"Type": "Numeric",
"TaskNumber": 2
},
"dimensions_gdata_id_ss": {
"FeatureName": "dimensions_gdata_id_ss",
"TaskName": "None",
"Options": "",
"Type": "String",
"TaskNumber": 1
},
"dimensions_did_ss": {
"FeatureName": "dimensions_did_ss",
"TaskName": "None",
"Options": "",
"Type": "String",
"TaskNumber": 1
}
}
Instead the current version gives this.. missing out the first task for "edata_eks_timeSpent_ss"
{
"edata_eks_timeSpent_ss": {
"FeatureName": "edata_eks_timeSpent_ss",
"TaskName": "Unit Conversion",
"Options": "frm = 'seconds',\nto = 'minutes'",
"Type": "Numeric",
"TaskNumber": 2
},
"dimensions_gdata_id_ss": {
"FeatureName": "dimensions_gdata_id_ss",
"TaskName": "None",
"Options": "",
"Type": "String",
"TaskNumber": 1
},
"dimensions_did_ss": {
"FeatureName": "dimensions_did_ss",
"TaskName": "None",
"Options": "",
"Type": "String",
"TaskNumber": 1
}
}
Ah, that makes sense then. JSON cannot have two fields with the same name within the same scope. The old method of exporting had no way to validate that, so it was possible to create malformed JSON. The current system prevents this, so the output result you are getting is correct.
Unfortunately, using the old formatting method is not possible with the current version of ESD as it allowed for malformed JSON. I apologize that the old method allowed such an oversight and has placed you into this situation.
If you are alright with a minor alteration, I would recommend just exporting your target sheet as a JSON array. That would produce something roughly similar, but would require you examine an array instead of a JSON blob.
If you must use your previous formatting, you could pull an old version of ESD from GitHub and run it as a custom script for your sheet.
Glad to hear it. The current method uses the standardized JSON library to export data, so this will hopefully never be an issue again (even if they update the browser JSON specification). I knew some people might be affected by the v40 update, but I also knew sticking to the JSON specification was important. Because of that, I dropped support for the previous export method. Again, I'm sorry that you were affected like this.