Skip to content

ProblemDetails.Extensions json tag is dead code (MarshalJSON never uses it) #19

Description

@rluders

`ProblemDetails.Extensions` is declared as:

```go
Extensions map[string]interface{} `json:"extensions,omitempty"`
```

but the type's custom `MarshalJSON` never serializes a nested `"extensions"` key — it flattens each entry to the top level instead (correctly, per RFC 9457). The struct tag is misleading: anyone reading the type definition without also reading `MarshalJSON` would reasonably expect a nested `extensions` object in the output, and it never appears.

Minor, but worth a fix — either drop the tag (since `MarshalJSON` bypasses it entirely) or replace it with a comment noting it's vestigial.

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