No announcement yet.

Looking for JSON Examples

  • Filter
  • Time
  • Show
Clear All
new posts

  • Looking for JSON Examples

    My first post on this forum was 8 years ago. Just bought my license last month!

    I'd like to download data from a JSON API into an SQLite table.
    I'm having trouble finding an example. Can someone point me in the right direction?
    The data looks like this:

  • #2
    With php you can decode the json string into a php array structure. Next you have to form your insert sql statement the regular way. In scriptcase it means that you use the macro's to insert data into your database. You can generate sample code to pick a onrecord event and then select the insert macro.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3
      I'm making progress. But I'm stuck on this date issue.
      The JSON field, last_updated, it's represented as an integer.
      Once imported into my table, it displays fine as an integer, but when I change the DataType to Date or Date and Time, the field display is blank.
      Do I need to adjust another parameter besides Edit Fields DataType? Or is some kind of conversion necessary?


      • #4
        Please see the email I sent to you today ...
        Gunter Eibl - Scriptcase & Open Source projects (German/English) - professional coaching for Scriptcase users (German) - About me (German)