-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create JSONHelper.lua #325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like stylua wasn't run on this file (likely not running on any files in this folder).
It may be possible for us to just use require("JSON")
, not sure.
|
||
--- @func Encodes to JSON and writes to file | ||
--- @param filename string File name including path | ||
--- @return any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return type should be specified (it's a table
, I believe? { [string]: any }
maybe?)
--- @param value any | ||
--- @param filename string File name including path | ||
function JSONHelper.encode_to_file(value, filename) | ||
local JSON = BIOS.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only place BIOS.json will be used is in this file, right? I'm thinking at the very least we should get rid of BIOS.json and just keep that definition local to this file.
|
Wondering how to isolate it more in regards of JSON.lua.