I am trying to serialize some data using protobuf net. During the serialization I am getting an error that No serialization defined for the type Point3D. I found one issue something like this but still unable to implement and resolve it. Link is as follow :- No serializer defined for type: System.Drawing.Color
[ProtoContract]
public class ReturnPanelData
{
[ProtoMember(1)]
public Point3D PlacedPoint3D { get; set; }
[ProtoMember(2)]
public double PlacementAngle { get; set; }
[ProtoMember(3)]
public string PanelName { get; set; }
}
[ProtoContract]
public class ReturnDataType
{
[ProtoMember(1)]
public List<ReturnPanelData> ReturnList { get; set; }
[ProtoMember(2)]
public double RemainderArea { get; set; }
[ProtoMember(3)]
public int Height { get; set; }
[ProtoMember(4)]
public int Width { get; set; }
[ProtoMember(5)]
public Point3D BasePoint3D { get; set; }
}
class Program
{
private static HashSet<ReturnDataType> _processedList = new HashSet<ReturnDataType>();
static void Main(string[] args)
{
using (var file = File.Create(@"D:\SavedPCInfo2.bin"))
{
Serializer.Serialize(file, _processedList);
}
Console.WriteLine("Done");
}
}
I am a begineer in JSON serialization/deserialization. How to resolve this issue ?
If it is not possible to serialize Point3D with Protobuf Net, what are the other options to serialize/deserialize a very big list (having approx 300000 items) ?