S
Scott
Hello,
I am working on a project that has a REST endpoint that is created with WCF
version 3.5. The object that is being returned has the necessary
[DataControl] & [DataMember] attributes and is serialized to JSON. This is
working correctly.
In the code that gets the object, it was found that it is actually already a
serialized JSON string. When the WCF endpoint was updated to return a
"string" to prevent the overhead of deserializing the object in the first
place. The issue is that the serialized JSON string was serialized again and
created invalid JSON; the client would have to deserialize it twice.
Is there a way to prevent WCF from serializing the object that is being
returned so that the string that is already JSON is returned? If this is not
possible, I'll just return the code to the way it was.
Thanks,
I am working on a project that has a REST endpoint that is created with WCF
version 3.5. The object that is being returned has the necessary
[DataControl] & [DataMember] attributes and is serialized to JSON. This is
working correctly.
In the code that gets the object, it was found that it is actually already a
serialized JSON string. When the WCF endpoint was updated to return a
"string" to prevent the overhead of deserializing the object in the first
place. The issue is that the serialized JSON string was serialized again and
created invalid JSON; the client would have to deserialize it twice.
Is there a way to prevent WCF from serializing the object that is being
returned so that the string that is already JSON is returned? If this is not
possible, I'll just return the code to the way it was.
Thanks,