[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gambas Json to SQLite table


On 10/3/26 19:07, KKing wrote:
any pointers or examples of Gambas Json to SQLite table
K.



Simplistic snippet below. Much depends on the actual Json file structure.

--------------------------------
Public Sub ExtractData(eJson As String) As String

Dim jData As JSONCollection
Dim jDetails As JSONCollection

Dim vTmp As Variant
Dim jTmp As JSONCollection

' load the main data section
jData = JSON.Decode(eJson, True)

' get a section of data
vTmp = jDetails["SomeSectionOfData"]

  ' loop the sections within vTmp & get the data
  For Each jTmp In vTmp
    ' store the data somewhere(dataClass?)
  Next

' write to db
Loop dataClass and stuff it in the DB

------------------------------

Regards
Denis


References:
Gambas Json to SQLite tableKKing <kicking177@xxxxxxxxx>