• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    JSON Parser Actor for macOS and Windows (public beta)

    Hardware, Interfacing, and Third-Party Software
    1
    3
    1659
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mark
      mark last edited by mark

      Dear All,

      Because of some posts by @bonemap and @robhblack I whipped together an actor that will parse JSON Strings.

      Basically you input any JSON string to the 'json in' input. The 'elements' output will update to show you how many top level elements were found. You will the want to set the 'selectors' input to specify how many selectors you would like to access, and finally enter the the selector names in 'select 1', 'select 2', etc.

      For example, this json string

      {
          "first_name" : "Mark",
          "last_name" : "Coniglio",
          "employer" : "TroikaTronix"
      }
      

      Would be parsed by setting up the JSON Parser as follows:

      When the souce data is an array (i.e., enclosed by square brackets [ ] ) then you need to access the items by index, starting at 0.

      [
          "Mark",
          "Coniglio",
          "TroikaTronix"
      ]

      If one of those elements is an "object" -- meaning it is a list enclosed by curly brackets (e.g., { and } ) then you would use a second JSON Parser to pull extract those values

      {
          "first_name" : "Mark",
          "last_name" : "Coniglio",
          "employer" : "TroikaTronix",
          "jobs" :
          {
              "job_1" : "bus boy",
              "job_2" : "programmer",
              "job_3" : "record producer"
          }
      }

      Or, you can access en embedded element by using a string of selectors separated by a colons. For example, the selector jobs:job_1 will give you the element job_1 inside of the jobs. 

      Obviously we'll need better instructions for this. But since this is more of an advanced feature that will not be so widely used, I thought I'd get it out there now and let you all have a go and offer any feedback.

      (Before you ask: no, I haven't made an actor to go the other direction yet. One step at a time. ;-) )

      Here's an example file you can play with. It includes the Get URL Text actor in the third scene, replicating the task that @bonemap and @robhblack were talking about.

      json-test.izz

      Finally, here's the .zip file with the actors themselves for both MacOS and Windows.

      json-parser-v0.9.1.zip

      (This plugin is notarized for Catalina.)

      Once we know this is working, we'll get it uploaded to the plugins page. In the meantime, post any issues here.

      Have Fun,
      Mark

      Media Artist & Creator of Isadora
      Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

      1 Reply Last reply Reply Quote 5
      • mark
        mark last edited by

        Edited on March 24, 2020: fixed a bug in 0.9.0 where you could not access arrays by index. Improved the instructions.

        Media Artist & Creator of Isadora
        Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

        mark 1 Reply Last reply Reply Quote 1
        • mark
          mark @mark last edited by mark

          @mark

          NOTE: the previou upload of the JSON Parser v0.9.1 did not have the Windows plugin. I have re-uploaded a corrected version on April 8, 2020 at 11:30 CEST. If you're missing the windows plugin, just download it again.

          json-parser-v0.9.1.zip

          Best Wishes,
          Mark

          Media Artist & Creator of Isadora
          Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

          1 Reply Last reply Reply Quote 1
          • First post
            Last post