HISE Logo Forum
    • Categories
    • Register
    • Login

    External JSON File

    Scheduled Pinned Locked Moved Scripting
    11 Posts 3 Posters 416 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.
    • S
      sakorada
      last edited by

      Can we include json file like we include external script?
      ex: var data = file('data.json');

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Link Preview Image
        HISE | Docs

        favicon

        (docs.hise.audio)

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public 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:

          Link Preview Image
          HISE | Docs

          favicon

          (docs.hise.audio)

          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

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public 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

                          56

                          Online

                          1.7k

                          Users

                          11.7k

                          Topics

                          102.1k

                          Posts