HISE Logo Forum
    • Categories
    • Register
    • Login

    External JSON File

    Scheduled Pinned Locked Moved Scripting
    11 Posts 3 Posters 492 Views
    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.
    • d.healeyD
      d.healey
      last edited by

      https://docs.hise.audio/scripting/scripting-api/engine/index.html#loadfromjson

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      1 Reply Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart
        last edited by

        Actually this is deprecated and I recommend to use the file system API:

        https://docs.hise.audio/scripting/scripting-api/file/index.html#loadasobject

        And yes, the documentation is now up to date again :)

        d.healeyD 1 Reply Last reply Reply Quote 3
        • d.healeyD
          d.healey @Christoph Hart
          last edited by

          @Christoph-Hart Even better :D

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          1 Reply Last reply Reply Quote 0
          • S
            sakorada
            last edited by

            @Christoph-Hart @d-healey
            How about we just include Json file before Export Plugins Only ?

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              Include it just like a js file...

              1 Reply Last reply Reply Quote 0
              • S
                sakorada
                last edited by

                @Christoph-Hart
                I could not do it ,
                Can you please give me an example ?
                Ex: i have "data.json" in scripts folder

                {
                  "name":"Abcd",
                  "email":"abcd@email.com"
                }
                

                and i want to past it to (var data)

                before i did add (var data) and change it to data.js then include in project

                var data = {  
                  "name":"Abcd",
                  "email":"abcd@email.com"
                }
                
                1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart
                  last edited by

                  You're almost there. Add a semicolon at the end to make it valid JS and then it should work.

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    sakorada @Christoph Hart
                    last edited by

                    @Christoph-Hart Oh yes , I forget to add ";" :D
                    but is it only way to do it?

                    And a quick question.
                    Not related Question: Does HISE have shortcut for comment like (ctrl + / or cmd + /) ?

                    1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart
                      last edited by

                      Use F4 :)

                      S 1 Reply Last reply Reply Quote 1
                      • S
                        sakorada @Christoph Hart
                        last edited by

                        @Christoph-Hart oh wow thank you
                        i can't even guess, :D

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

                        15

                        Online

                        2.0k

                        Users

                        12.7k

                        Topics

                        110.2k

                        Posts