Skip to content

Nested object is getting serialized as empty array #46

@surajgotake

Description

@surajgotake

I am trying to track mixpanel events using _mixpanelClient.TrackAsync("clicked", properties);
Here, properties object I am passing is as below:

var properties = new Dictionary<string, object>
                {
                    { "key", "payments"},
                    { "app", "payment tool" },
                    { "validations", new Dictionary<string, object>
                       {
                         { "enough_fund", true }, 
                         { "account_closed", false } 
                       } 
                    },
                })

I see key & app properties serialized correctly. But, validations object is empty array.

{
  "event": "clicked",
  "properties": {
    "app": "payment tool",
    "key": "payments",
    "validations": []
  }
}

How can we get correct validations object serialized?

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