I am trying to call a json file that would be located in plugins/json/file.json
This is for an experimental plugin I wanted to play with, but how would I go about grabbing that json file if I am able too?
I just want to grab it and then read whats inside to use through the plugin.
Would it be just setting up like:
Any info is appreciated! Thanks!Code:var path = "/json/file.json" JSON.parse(path);
Solved Reading and parsing external JSON file?
Discussion in 'Rust Development' started by KillParadise, Apr 24, 2015.
-
No that is blocked by oxide you can't and are not allowed to use those calls.
You can only use the built in datafile management, so they would be in data/
Look at my copy paste plugin i use those à lot in this plugin -
Wulf Community Admin
You'd need to use the datatable API provide by Oxide to create and read json files, else use C# to create one manually in the data directory.
I believe JSON parsing is only available by using the Newtonsoft.Json.dll too. -