snowplow/snowplow-python-tracker

Support `json.dumps` args and kwargs in `SelfDescribingJson.to_string`

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.

This is just a nice to have. Useful for debugging the contents of an event or context.

Describe the solution you'd like

Allow passing the arguments for json.dumps in SelfDescribingJson.to_string.

def to_string(self) -> str:
return json.dumps(self.to_json())

Describe alternatives you've considered

I considered subclassing SelfDescribingJson, but this might be something others find useful.

Additional context

I can start working on a PR if this is something the maintainers are interested in having.