Unity SDK 5.1.0 changed the object fallback of MicroserviceClientHelper.DeserializeResult<T> from JsonUtility.FromJson<T> to SmallerJSON Json.Deserialize<T> (74dcc19).
Expected (5.0.x behavior): response DTO reference fields arriving as explicit JSON nulls deserialize to non-null defaults ("", empty array/list, default-constructed nested object); absent List, nested object, and ContentRef members are also default-constructed. The default microservice response serializer emits unassigned reference fields as explicit nulls (identically on 4.3.8 and current), so every object response takes this shape.
Actual: those members now deserialize to null, causing NullReferenceExceptions in game code written against the 5.0.x guarantees. Affects top-level object responses; the list path is unchanged.
Fix + regression tests: #4755. Additional Unity-runtime tests demonstrating the regression (red on 5.1.x, green at unity-sdk-5.0.1): #4754 (closed, branch microservice-client-null-defaults-tests).
🤖 Generated with Claude Code
Unity SDK 5.1.0 changed the object fallback of
MicroserviceClientHelper.DeserializeResult<T>fromJsonUtility.FromJson<T>to SmallerJSONJson.Deserialize<T>(74dcc19).Expected (5.0.x behavior): response DTO reference fields arriving as explicit JSON nulls deserialize to non-null defaults (
"", empty array/list, default-constructed nested object); absentList, nested object, and ContentRef members are also default-constructed. The default microservice response serializer emits unassigned reference fields as explicit nulls (identically on 4.3.8 and current), so every object response takes this shape.Actual: those members now deserialize to
null, causing NullReferenceExceptions in game code written against the 5.0.x guarantees. Affects top-level object responses; the list path is unchanged.Fix + regression tests: #4755. Additional Unity-runtime tests demonstrating the regression (red on 5.1.x, green at unity-sdk-5.0.1): #4754 (closed, branch
microservice-client-null-defaults-tests).🤖 Generated with Claude Code