Severity: Warning
Files:
src/Servy.Core/Services/IJsonServiceSerializer.cs line 17
src/Servy.Core/Services/IXmlServiceSerializer.cs line 17
Description:
The two symmetric serializer interfaces are inconsistent: XML Deserialize accepts string? (null-safe), JSON Deserialize requires non-null string. A null JSON string will bypass the null contract at compile time and likely throw at runtime. Both should be string? since both can legitimately receive null.
Suggested fix:
Change IJsonServiceSerializer.Deserialize(string json) to Deserialize(string? json).
Severity: Warning
Files:
src/Servy.Core/Services/IJsonServiceSerializer.csline 17src/Servy.Core/Services/IXmlServiceSerializer.csline 17Description:
The two symmetric serializer interfaces are inconsistent: XML
Deserializeacceptsstring?(null-safe), JSONDeserializerequires non-nullstring. A null JSON string will bypass the null contract at compile time and likely throw at runtime. Both should bestring?since both can legitimately receive null.Suggested fix:
Change
IJsonServiceSerializer.Deserialize(string json)toDeserialize(string? json).