3 ms·
I've taken a crack at something similar, I'd love to see what you came up with. I ended up with this super-meh solution: https://github.com/zmap/ztag/blob/maste
by dadrian 11y ago
I've taken a crack at something similar, I'd love to see what you came up with. I ended up with this super-meh solution: https://github.com/zmap/ztag/blob/master/ztag/transform.py#L7 https://github.com/zmap/ztag/blob/master/ztag/transform.py#L...
- StavrosK 11y agoWhat I had in mind sounds pretty close to yours, really. I was thinking of adding a default somewhere along the line (possibly the end), so you could do: json.structure.that.i.want.to.access.default(True) Or something like that. I don't really like the default item API I've come up... I'll comment here if I do give it a go, thanks for the snippet!
- StavrosK 11y agoMy thing turned out to be pretty much the same as yours, also equally meh: https://github.com/skorokithakis/jsane https://github.com/skorokithakis/jsane There's no code there, but the underlying class is pretty much spot on yours. I'm still trying to improve the API, but it's not looking great.