Hello Mark,
1. You don't need to assign the value to any variable, this will remove the hint.
2. I don't know what to suggest in this case, I would have to have more details to guess what's going on. However, I'd suggest you use the serializer used by XData, not the TDataSnap one which is a legacy one. Here is how you could use it:
Serializer := TXDataJsonServerSerializer.Create(TXDataAureliusModel.Default);
try
Json := Serializer.Write(MyEntity);
// or
Serializer.Write(MyEntity, ContentStream);
finally
Serializer.Free;
end;