json
json copied to clipboard
Implement 'inline' support
While looking for ways to neatly map 'unmapped keys' in my structs, I came across the following:
- http://devel.io/2013/08/19/go-handling-arbitrary-json/
- https://godoc.org/labix.org/v2/mgo/bson#Marshal
Basically, it implements an inline
tag that is then used to read all of the extra fields into a map[string]interface{}
Thanks for adding this issue. I like this feature request.
tbh, we've already done things like this - https://medium.com/@utter_babbage/breaking-the-type-system-in-golang-aka-dynamic-types-8b86c35d897b.
I can add support for this, however find myself short on time to do it. :(
I can direct anyone willing to implement this feature if you have the time. Let me know if you can help me @0xdevalias, and I'll add you to our slack channel and we can add this feature together. :)
I definitely understand the time pressure side of things. At this stage, I don't have capacity to help implement it, but if I find the bandwidth and it hasn't been done yet, will definitely let you know :)
(Also, while half that post went over my head, it was a super interesting read!)
(Also, while half that post went over my head, it was a super interesting read!)
thanks! :+1: