Skip to content

Can't marshal a Variant value as JSON #306

@lifubang

Description

@lifubang

As described by @kolyshkin in opencontainers/runc#3361 (comment), we can't marshal a Variant variable as a json string.

If we use json.Marshal, we will get an empty string(Not an empty string, but an empty JSON like "{}").
If we use Encode in encoding/gob, we will get an error:

Error encoding: gob: type dbus.Variant has no exported fields

Do you want to implement the json interface? Or let others who use the type Variant to implement it in their own projects?

Metadata

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