Skip to content

Possible to format raw string literals? #2

@adrianiftode

Description

@adrianiftode

Consider the following snipped

        using var subject = new HttpResponseMessage(HttpStatusCode.BadRequest)
        {
            Content = new StringContent(/*lang=json,strict*/ """
                {
                   "type":"https://tools.ietf.org/html/rfc7231#section-6.5.1",
                 "title":"One or more validation errors occurred.", "status":400,
                            "traceId":"00-deb7480af23a884e942f7b85cac6bd35-c1abe72874d40c4a-00",
                   "errors":{
                      "Status":[ "Cannot add at Revoked Status." ]
                            }
                }
                """, Encoding.UTF8, "application/json")
        };

My use case would be to select the json in this string literal and then to prettify/format it.

Is this something that can be implemented within this extension?

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