- Sivaprakash BKR
- PowerBuilder
- Monday, 12 August 2019 03:40 PM UTC
Hello,
Using PB 2017 R3,
Trying to import a JSON file created by a third party, into a datawindow. The siva2.rar (attached) opens well in Notepad++, with proper plugins. Notepad ++ displays the data perfectly.
Now, when I try to import with either
ll_RowCount = dw_1.ImportJsonByKey(ls_Json, ls_error) Or
ll_rowcount = dw_1.ImportJsON(ls_json, ls_error)
Messagebox('Rows', ll_rowcount)
I get error -5 - Invalid JSON Format
Looks like the format is not as expected by ImportJSON* functions.
Tried reading the JSON file using JSONParser and calling a recursive function to read all the values. I could read all the values, but struck when to add a row to a datawindow and fill all required values. Could not arrive a logic to fill all columns by inserting a row (at what point).
Any help in transferring this json data into datawindow, if possible with codesnippet, will be very much helpful.
Happiness Always
BKR Sivaprakash
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.