Forum Discussion
We Found Extra Characters at End of JSON Line
Hi Sergei,
Thank you for your insight and reply! I will apply your suggestion and reply back on the results.
Hi Ron,
Not sure about conversion of JSON to CSV, perhaps that also could help. However, your error is not since records in the array have different sets of elements. My vision
- PQ parser always works if you have only one record in the array;
- if you have more than one record to parse JSON correctly you shall separate records in the array by comma and add on the top the name of the object.
In the attached archive Excel file parses you initial JSON modified as above. You only have to expand nested records one by one. If some elements are missed null will be returned in related column.
Here is also your sample with 2 records, initial one and updated as above. First one returns extra character error, second one works.
In addition, if generate M script manually with not-updated JSON and click on error you'll see it points on the first after character of the second record, doesn't matter how many records you have and do they have exactly the same structure or not.