Hi! 

On Thu, 14 Sep 2023, Peter Galbavy wrote:
> You will need to create a custom type and unmarshal method. Plenty of 
> example if you search for "golang custom json unmarshal".
> 
> As I've only had to implement it for a couple of simple types I can't offer 
> my own valid example.

I am aware of the ability to make custom unmarshalers, but in this
particular case, I would have to ma an unmarshaler for basically the
whole JSON - since I cant map all variants of foo[n].something to one
type/unmarshaler: the stdlib JSON functionality using struct tags does
not allow fro wildcards/patterns, as far as I can tell, and I don't know
what range N might be in, so I can't hardcode it.

Best,
Tobias

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/71b08ca9-9bef-4597-be95-87cdf2e1eec9%40skade.local.

Reply via email to