Skip to content

Handle unions more elegantly #43

@tomquisel

Description

@tomquisel

There's a recently-added implementation of XDR/JSON in Go from David Mazieres that you can find here. It does something cool, which is it uses the name of the XDR union discriminant instead of the _type variable in the output. Since the discriminant variable is part of the union, it's not possible to have a name collision between the discriminant variable name and one of the members of one of the union. This seems like a good call!

It'd also be great in general to make the two implementations match, picking the best features of each.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions