Skip to content

Unable to Json.Marshal an Envelope object #146

Open
@jnury

Description

What I did: json.Marshal(envelope)

What I expected: convert an Envelope object into Json

What I got: a stack overflow when envelope contains at least one part

Release or branch I am using: master

Please find attached a file to reproduce. As I understand the problem, there is an infinite loop while walking the Envelope object as we can go to Envelope.Root.FirstChild.Parent.FirstChild.Parent en so one.

Would it be possible to create a func (e *Envelope) ToJson() (string, error) function ?
Or instruct Json.Marshal to not walk thru the Parent property ?

Thanks for your help

enmime_json_marshal.go.txt

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions