Python Forum

Full Version: Deeply nested JSON editing tool w/set arithmetic
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey y'all, I'd like to get some feedback on a JSON editing tool I recently published: https://github.com/project705/jsonsam. This pulls together some techniques I've employed over the years to use standard Unix line based tools like vim, sed, diff and grep to edit complex highly nested JSON. The tool converts JSON to an intermediate denormalized form for editing, then converts back to standard JSON to render the edits. It's somewhat similar to JSON-patch and JSON-streaming, but the denormalized form places each individual path on its own line allowing easier editing and diffing.

The tool can also perform deep merges ("a.json | b.json"), differences ("a.json - b.json") and intersections ("a.json & b.json") on pairs of JSON files.

Lastly, JSON files can be easily split and merged in arbitrary ways. For example, it's easy to merge a directory of JSON files into a single file, split a large file in to arbitrarily many smaller files, or transform n JSON files into m JSON files.

Please see https://github.com/project705/jsonsam for some documentation and examples. Install with "pip install jsonsam".

I'm particularly interested in feedback regarding packaging and distribution as this is my first time publishing to PyPI, but any and all feedback, including the code itself, is enthusiastically welcomed.

Thank you!

- Eric