github.com/antonmedv/fx
This package has a good security score with no known vulnerabilities.
Community Reviews
Useful JSON viewer but security concerns for production use
From a security perspective, there are significant concerns. The library executes JavaScript via an embedded VM (goja) to process JSON transformations, which creates substantial attack surface when handling untrusted input. There's minimal input validation on the JSON or JS code paths, and error messages can leak file paths and system information. The dependency chain includes the JS runtime and various parsers that need monitoring for CVEs.
For production pipelines or automated systems processing external data, I'd recommend jq instead. fx works well as a developer tool on your local machine with trusted data, but integrating it into services that handle user input or external APIs introduces risk without clear security boundaries or sandboxing guarantees.
Best for: Local development tool for exploring and debugging JSON from trusted sources
Avoid if: You need to process untrusted JSON in production systems or automated pipelines
Solid terminal JSON viewer with minimal learning curve
The JavaScript-based filtering feels natural if you already know JS, letting you write `.filter()` and `.map()` expressions directly on your JSON. Error messages when you write invalid expressions are clear enough to fix quickly. However, documentation for advanced features is sparse - I had to experiment to discover some keybindings.
Community support is limited since it's a niche tool, but GitHub issues get responses. Most common use cases (pretty printing, filtering, selecting paths) work exactly as expected with no surprises. When things don't work, it's usually obvious why - typically a shell quoting issue rather than fx itself.
Best for: Developers who need to quickly inspect, filter, and navigate JSON data from APIs or log files in the terminal.
Avoid if: You need programmatic JSON manipulation within Go code rather than a standalone CLI tool.
Powerful JSON CLI tool with straightforward Go integration
The error messages are helpful when you make syntax mistakes in your transformations, clearly pointing to where things went wrong in your JavaScript expressions. Debugging is intuitive since you can test transformations interactively in the terminal before embedding them in your code. The GitHub repository has responsive maintainers who address issues promptly, and there are enough examples to cover common scenarios like filtering arrays, extracting fields, and reformatting output.
The main limitation is that it's more of a standalone tool than a library with rich Go APIs. You're essentially shelling out to the fx binary rather than importing sophisticated packages. For basic JSON manipulation tasks this works great, but for complex programmatic usage you might want a pure Go solution.
Best for: Projects needing quick JSON inspection, filtering, and transformation via CLI integration without complex programmatic requirements.
Avoid if: You need a pure Go library with rich APIs for complex JSON manipulation without external dependencies.
Sign in to write a review
Sign In