The question is extremely unclear, so I cannot be 100%. So, the
approximate question is: yes, you can create one object in one application, pass it to another application/process via WCF and re-create it there. (Withing the same process, it would not make any sense.) This is done in a type-
agnostic way. You don't have to deal with JSON, XML or binary stream directly; you only define the
data contract, which is done by adding appropriate
attributes to some types and members.
Please see:
Using Data Contracts[
^],
DataContractJsonSerializer Class (System.Runtime.Serialization.Json)[
^],
DataContractSerializer Class (System.Runtime.Serialization)[
^].
See also:
C# Corner: Data Contract in WCF[
^],
Understanding different types of WCF Contracts[
^].
—SA