json icon indicating copy to clipboard operation
json copied to clipboard

Implement 'inline' support

Open 0xdevalias opened this issue 6 years ago • 3 comments

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{}

0xdevalias avatar Apr 12 '18 02:04 0xdevalias

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. :)

wlan0 avatar Apr 12 '18 03:04 wlan0

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!)

0xdevalias avatar Apr 12 '18 03:04 0xdevalias

(Also, while half that post went over my head, it was a super interesting read!)

thanks! :+1:

wlan0 avatar Apr 12 '18 04:04 wlan0