snowplow / snowplow/snowplow-python-tracker

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

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
46
Forks
65
Avg merge
5h 45m
Merged PRs (30d)
1

Description

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.

https://github.com/snowplow/snowplow-python-tracker/blob/67642d247cefc8019a3584e89ae9159cc09b4844/snowplow_tracker/self_describing_json.py#L40-L41

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in snowplow_tracker/self_describing_json.py at SelfDescribingJson.to_string, referenced by the issue. Read how it currently calls json.dumps and inspect nearby tests or usage before deciding the supported argument forwarding. Done means callers can pass json.dumps arguments and keyword arguments for debugging serialization without changing existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.