Open livingsilver94 opened 3 years ago
That's a cool idea. I haven't touched this package in a while, I'd have to look through it to see how easily I could accomplish that. This package has been taking a up a lot of my OSS time, but I'll see if I can't squeeze in some time for this at some point in the near future.
I'll happily take a pull req if you want to take a swing at it.
I'll give it a try, but no promises ;)
Hopefully the code isn't too big of a mess. It was my first project in Go. :)
I'd like to use this library for marshaling and unmarshaling Redis hashes. Since Redis hashes are very similar to
map[string]string
, they don't support nested values, so it'd be useful to have a flattening mechanism, e.g.:Would result in:
I chose the hierarchy separator to be a dot, but you could use whatever you want, or even make it customizable. Probably, it's needed to introduce the
inline
tag, like in thejson
package.