1. 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:
    Code:
    var path = "/json/file.json"
    JSON.parse(path);
    
    Any info is appreciated! Thanks!
     
  2. 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
     
  3. Wulf

    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.
     
  4. Ah thank you both, that may put a damper on the plans then, was looking into maybe making a config updater that used json files for data. So it may or may not use a lot of files, may make a ugly data folder. :p