How can I read a json file from a bxl?
- Dominant language
- Rust
- Stars
- 4.4k
- Forks
- 394
- PR merge metrics
- No merged PRs in 30d
Description
I want to have a bxl that accepts a `cli_args.string()`, and then load and parse this file from within the bxl and act on its contents. Is this possible? I see `cli_args.json()`, but this expects the json as a string, and this is very inconvenient (pretty much unusable) for direct command line invocation. I see that `artifact` has a method called `read_json()`, but somehow I have to turn this file path which is in a string into an `artifact`, and I don't see a way to do that from existing bxl apis.
The context here is that I want to improve vsgo to be able to support a more advanced specification system for deciding what targets to put into the solution. I want the user to be able to specify a json file with rules about which targets to include and exclude, so people can get a very tight solution that contains only the things they need / want.
cc: @autozimu @Nero5023
Contributor guide
Assessment
This issue has not been assessed yet.