Skip to content

Deterministic mode #82

Open
Open

Description

Upstream proto has a "deterministic" mode: https://github.com/protocolbuffers/protobuf-go/blob/f221882bfb484564f1714ae05f197dea2c76898d/proto/encode.go#L50

I think this is more-strict than marshal_strict (but I could be wrong) in that it also sorts maps.

Interestingly, there is a "Stable" field here:

Stable, once, strict bool
. but its never used.

It might be nice to add this option, or if its already possible documentation around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions