Change a aJSON list to an Applescript list?


Brian Christmas
 

G’day

I’m very slowly making progress in getting my Application “Mail Manager” to a saleable state. So much to learn about.

However, I’m using a subscriion model via fastSpring, and need to check monthly if the serial number for each App is still in FastSprings valid serials active list.

This list is downloadable as a JSON file, and I’m trying to work out how to interpret that information into an Applescript list.

The JSON API is in the form…

{
  "action": "subscription.getall",
  "result": "success",
  "nextPage": 3,
  "subscriptions": [
    "khyNPLY3TYiQhBfHyjZINg",
    "w46bQ2-gTayzJfFXbV1VWg",
    "86cFjtgCRlSmOPbLcX_mCA",
    "v0yPCSTLSyarVe9NlNalSA",
    "FWhWZ3b6StyfiJ_GnyHswQ",
    "A5xx9TF_R26PcCMdagAC8Q",
    "pgNumDwTSbaLeNY6FtUF3Q",
    "IK2eD1nvSP-L3yilE6K7BQ",
    "iZ8qUO-MSwuezTn_elPb3g",
    "gLspcP3NRqmdOm615HSTig",
    "HYKxh1JfTcyUhTgJxAxfWg",
    "1RkJixj_QKOg_c7G_wGIZA",
    "LiPzVuKnT2Go1WWteQkZtw",
    "V5wXtLilSsWGkMYSiLVy2g",
    "MseNZ_LBRu63R84k9knIKg"
  ]
}
I’ve found a page on GitHub that espouses Json Helper, but cannot for the life of me work out how to add this to my App.

I just need to check if the localised, encrypted serial number is in the JSON list. Is it possible to convert the JSON list to text, and just see if the  text ‘contains’ the serial number. Inelegant, but if it would work????

Any advice please?

Regards

Santa

Join applescript@apple-dev.groups.io to automatically receive all group messages.