Questions tagged [netdatacontractserializer]

44 questions
2
votes
1 answer

Protobuf .NET serialization for inheritance classes

I'm trying to migrate my code serializer from NetDataContract to Protobuf.Net. Let's consider the following class example to help the understanding: [DataContract(Name "a", IsReference = true)] class Test { [DataMember(Name = "a")] public…
2
votes
1 answer

'The use of type .. is not supported with NetDataContractSerializer' - why is NetDataContractSerializer being used?

This error is caused because the NetDataContractSerializer (NetDCS) is being used, but the reference assembly is not shared and included in the client. This question is not about that. This question is about preventing NetDataContractSerializer from…
2
votes
2 answers

Faster serialization of `Serializable` objects

Our client/server app uses a NetDataContractSerializer to serialize arbitrary Serializable objects. The output of BinaryFormatter would be somewhat smaller, performance however isn't really better. Now smaller representations are possible (e.g. the…
2
votes
1 answer

Custom attribute to switch property serialization to NetDataContractSerializer

In .NET 3.5, I would like to create a custom attribute (say [NetDataMember]) that would switch the serialization behavior from DataContractSerializer to NetDataContractSerializer. Basically, for a class A as illustrated below [DataContract] class…
2
votes
1 answer

Add Service Reference is ALWAYS generating xmlserializer and not DataContractSerializer

i have a service : http://chronicpainhostservice2.cloudapp.net/Service1.svc i consume it in silverlight 5.0 application. and it all worked fine. However, when i adding this service to the project using "add service reference" it ALWAYS generating…
2
votes
2 answers

NetDataContractSerializer and CLR types

For NetDataContractSerializer msdn states below "NetDataContractSerializer can be used only if both the serializing and deserializing ends share the same CLR types". My undertanding is that, If I serialized file in .net4.0 using…
user1427678
1
vote
1 answer

Serialization after object removal error (NetDataContractSerializer)

I am using the NetDataContractSerializer. I can create, add and serialize objects into data file no problem; reloading the file into the GUI has no issue. However I run into a problem when I attempt to delete(remove) objects from the data and…
user856197
1
vote
1 answer

Moving from WCF to gRPC, replacing NetDataContractSerializer

As part of moving from WCF to gRPC I am dealing with NetDataContractSerializer which is used for serializing objects on client side and de-serializing on server side. Both client and server are sharing same DLL with types used in communication. As…
user2126375
  • 1,594
  • 12
  • 29
1
vote
1 answer

MVC Deserialization Error

Okay. This is my company's customer portal, it's an MVC 2 project. We have a back end SAP system that the portal draws data from. But it does not directly hit SAP, it sends an xml request to a VB app that gets the data and sends it back in an xml…
Nick
  • 1,903
  • 2
  • 21
  • 40
1
vote
0 answers

Integrate from DataContract to IXmlSerializable using NetDataContractSerializer

I have some data that is persisted in a database. The serialized content was originally written using the default NetDataContractSerializer with a DataContract attribute on the classes. Now I want to move to using classes that implement…
4thex
  • 1,094
  • 1
  • 9
  • 21
1
vote
2 answers

Passing Guid to WCF service with NetDataContractSerializer

I've created the contract [ServiceContract] public interface ITestService { [OperationContract] [NetDataContract] void PassGuid(Guid id); [OperationContract] [NetDataContract] void PassInt(int id); } Attribute…
bonzaster
  • 313
  • 2
  • 12
1
vote
2 answers

What are all these null collection entries in my DataContract XML?

Does anybody know why the NetDataContractSerializer might add "nil" entries in a serialized collection? For example, <_items z:Id="18" z:Size="4"> Job1
user1228
1
vote
2 answers

Linq To Sql objects and Serialization issue

I am trying to serialize an object graph. It works up until I have to load a child entity that is an entity set. The system won't allow it to serialize... it gives me this error: Type…
DJ Burb
  • 2,346
  • 2
  • 29
  • 38
1
vote
1 answer

How to test for Serializable by the NetDataContractSerializer?

Is there any way to test if a type is Serializable by the NetDataContractSerializer in code? I'm writing a generic class that uses the NetDataContractSerializer internally and want to throw an exception in the constructor if there is an attempt to…
Patrick Szalapski
  • 8,738
  • 11
  • 67
  • 129
0
votes
2 answers

Deserialization of nested data

My first attempt and JSON desrialization and I'm stuck, just wondering if you could help? I have the following JSON { "summary":{ "pricing":{ "net":988, "tax":13, "gross":729 }, …
Matthew Deloughry
  • 292
  • 2
  • 7
  • 25