We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Read Json Data and put it into Variables

Home Forums Puzzles Read Json Data and put it into Variables

Tagged: 

  • This topic has 17 replies, 9 voices, and was last updated 2 years ago by kdv.
Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #58854
    kdv
    Participant

    just remove these stupid if else from the code and read JSON as you did it before 4.1+. These three lines of code made a lot of problems )))

    indexOf('application/json' > -1) ONLY if the file extension is .json. but it can be .gltf or any other extension or no extension at all))) In fact, it was a bad idea to add this feature. There is a good puzzle read JSON from and it works good with all files…

    https://www.soft8soft.com/topic/verge3d-4-1-1-maintenance-update/page/2/#post-55519

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #58860
    jakob
    Customer

    Hello,
    thanks for the help! I tried it and the error message disappeared, but somehow the json file could not be read – the variable remained empty.
    I have now thought of my own solution which I would like to share here in case someone encounters the same problem.

    Attachments:
    You must be logged in to view attached files.
    #58862
    kdv
    Participant

    but somehow the json file could not be read – the variable remained empty

    read JSON as you did it before 4.1+ means this set of puzzles: load data from a file -> read JSON from loaded data

    see no problems with your json file…

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

Viewing 3 posts - 16 through 18 (of 18 total)
  • You must be logged in to reply to this topic.