Skip to content

json: cannot unmarshal bool into Go struct field Event.metadata of type string #40

Open
@thnk2wn

Description

@thnk2wn

Executing event, err := client.GetProjectEvent(org, project, eventId) returns this error:

json: cannot unmarshal bool into Go struct field Event.metadata of type string

Event metadata appears to be defined as:

Metadata *map[string]string json:"metadata,omitempty"`

Looking at the response, there can be non string data types like this boolean:

"metadata": {
  "display_title_with_tree_label": false
}

This change resolves the error:

Metadata *map[string]interface{} json:"metadata,omitempty"

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