hashicorp / go-set

The go-set package provides generic Set implementations for Go, including HashSet for types with a Hash() function and TreeSet for orderable data
Mozilla Public License 2.0
118 stars 8 forks source link

add json encoding/decoding handlers #22

Closed shoenig closed 1 year ago

shoenig commented 1 year ago

It would be nice to have custom JSON encoder/decoders so we can have Sets in JSON that don't expose the underlying data structure, e.g. the string representation could then be something like

["a", "b", "c"]

instead of

[{"a":{}}, {"b":{}}, {"c":{}}]