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
Want json-sort for sorting json objects #17
Comments
I've needed something like this in order to use "diff" with large json objects. It's poorly documented, but it's here if you want to use it: https://github.com/davepacheco/kartlytics/blob/items/tools/json_normalize It seems like you should be able to do this with "json -e" as well, but I haven't been able to make that work. |
Would something first-class in |
Potentially, yes. The "json_normalize" tool I linked to sorts all object |
I wouldn't mind if it ends up in the json-tool as long as trentm/json#49 is done before-hand. That said, though, the json tool can't assume that all the json objects will fit in memory- it's going to have to implement some sort of external merge sort (like the unix sort command does today). I wasn't sure that sorting complexity should be put in the json-tool, but it's really up to you, trentm. |
As far as I've searched, I haven't found an app doing external merge sorts of json objects. For sorting json objects in Manta, it seems that someone would need to extract a field in the first pass, sort using the standard unix sort and then remove the field in a final pass. Of course, all this could be done as part of the user's "standard" data processing, but that requires more complexity than most people want/need.
manta-compute-bin may not be the right place for a tool like this, but it's a good place to record the idea. Also, it'd be nice to have these options:
The text was updated successfully, but these errors were encountered: