Skip to content

Support ability to return compact JSON format when calling SerializeAsJsonAsync #2798

@rmijacques

Description

@rmijacques

Is your feature request related to a problem? Please describe.
I would like to obtain a compact json format when calling OpenApiSerializableExtensions.SerializeAsJsonAsync

Describe the solution you'd like
That could be done by adding an optional OpenApiJsonWriterSettings parameter to the SerializeAsJsonAsync method (with Terse = true if compact format needed)

Describe alternatives you've considered
Currently i can parse and re-serialize json to obtain a minified format but it would be better to just be able to have the right format immediately.

Additional context
I'm able to propose a pull request if needed.

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