The project is in a healthy, maintained state
json uniq by json path
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

dorian-json-uniq

Deduplicate top-level JSON arrays.

Install

gem install dorian-json-uniq

Also included in the aggregate gem:

gem install dorian

Usage

json-uniq [options] [json ...] [file ...]

Run json-uniq -h for generated option details and json-uniq -v for the installed version.

Notes

  • Non-array JSON is parsed and printed back unchanged. Use --pretty false for compact output.

Examples

Deduplicate compactly

json-uniq '[1,1,2]' --pretty false

Output:

[1,2]