Skip to content

Support json.dumps args and kwargs in SelfDescribingJson.to_string #263

@edgarrmondragon

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.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions