I was putting together a PR for more helpful JSON error messages when I noticed that we seem to have a bunch of virtually identical but still different ways of reading JSON or YAML data + checking for errors.
For example:
@EvanLovely thoughts on trying to stick to some consistant variable names here -- maybe even just pull this chunk out into it's own function (pass the file to read in -- return the decoded data)? Could even lead to supporting other data formats if this single function got updated...
I was putting together a PR for more helpful JSON error messages when I noticed that we seem to have a bunch of virtually identical but still different ways of reading JSON or YAML data + checking for errors.
For example:
@EvanLovely thoughts on trying to stick to some consistant variable names here -- maybe even just pull this chunk out into it's own function (pass the file to read in -- return the decoded data)? Could even lead to supporting other data formats if this single function got updated...