Skip to content

Use a json encoder that supports private fields in golang #193

@symbiont-stevan-andjelkovic

Description

In order to be able to make assertions about how the state of all components changes over time and to make debugging easier, we dump and save the state of components in json format when they receive an event.

In golang we currently use encoding/json for this, but given that it simply drops private fields this isn't ideal (which leads to workarounds such as introducing an extra datatype which exposes the private fields).

Perhaps an other library which also encodes private fields can be used, e.g. https://github.com/json-iterator/go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions