`ProblemDetails.MarshalJSON` flattens `Extensions` to the top level per RFC 9457 (`type`/`title`/`status`/`detail`/`instance` plus arbitrary extension keys, all siblings). There's no corresponding `UnmarshalJSON`, so decoding a problem response back into a `ProblemDetails` loses every extension member — `json.Unmarshal` only populates the struct's declared fields and silently drops the rest, since `Extensions` isn't itself a tagged field that captures leftover keys.
This bites API clients and tests that need to decode a problem response and inspect an extension (e.g. a `messageKey` i18n hint, or a `correlationId`) — there's no way to get it back out via the type this library provides.
Requested: a matching `UnmarshalJSON` that reads the known fields and stuffs everything else into `Extensions`, so `ProblemDetails` round-trips through JSON.
`ProblemDetails.MarshalJSON` flattens `Extensions` to the top level per RFC 9457 (`type`/`title`/`status`/`detail`/`instance` plus arbitrary extension keys, all siblings). There's no corresponding `UnmarshalJSON`, so decoding a problem response back into a `ProblemDetails` loses every extension member — `json.Unmarshal` only populates the struct's declared fields and silently drops the rest, since `Extensions` isn't itself a tagged field that captures leftover keys.
This bites API clients and tests that need to decode a problem response and inspect an extension (e.g. a `messageKey` i18n hint, or a `correlationId`) — there's no way to get it back out via the type this library provides.
Requested: a matching `UnmarshalJSON` that reads the known fields and stuffs everything else into `Extensions`, so `ProblemDetails` round-trips through JSON.