How do I read remote JSON file in script?


#1

Hello,

The documentation for the File object seems incomplete at:
https://docs.highfidelity.com/api-reference/namespaces/file

In particular you can unzip files, but where’s the documentation for reading them in the first place? Advice on how to do this?

Dusty


#2

You can either use XMLHttpRequest or alternatively, if just JSON ou can use Script.require as detailed in

Beyond the Wall of Scripts: Scripting in High Fidelity - Primer for Intermediate Programmers

That basically already converts the file into Json / js