hosh-shell / hosh

Human Oriented SHell
https://hosh-shell.github.io
MIT License
25 stars 0 forks source link

CSV, JSON and XML support #155

Open dfa1 opened 4 years ago

dfa1 commented 4 years ago

Problem Right now Hosh provides some very basic support for sorting, filtering, splitting, etc. Explore and experiment some new commands around data manipulation.

Solution Existing solutions of data manipulation of CSV, TSV, JSON are: https://github.com/johnkerl/miller https://github.com/stedolan/jq https://github.com/nushell/nushell

Benefit Be able to apply built-in commands like take drop select filter to produce/consume CSV/TSV/XML/JSON.

dfa1 commented 4 years ago

TSV and CSV could be covered by http://commons.apache.org/proper/commons-csv/ (a 44KB library with no additional dependencies).

JUnit5 is using https://github.com/uniVocity/univocity-parsers but jar file is quite big (400KB).

dfa1 commented 4 years ago

JSON could be covered by:

Please note that JSR 374 supports JsonPointer (https://tools.ietf.org/html/rfc6901).

dfa1 commented 4 years ago

XML could be covered without any additional dependency. Sample: