You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ProblemDetails has custom MarshalJSON but no UnmarshalJSON — problem responses can't round-trip #18
`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.
Activity