This question already has an answer here:
- json.Marshal(struct) returns “{}” 2 answers
I want to Marshal and Unmarshal a recursive type in go something like this:
type Dog struct {
age int
sibling *Dog
}
Is there any way to do this in golang? I tried with json.Marshal but it doesn't work.
</div>