serialization

What's a good memory-conservative serializer to replace BinaryFormatter? [closed]

泪湿孤枕 提交于 2019-12-24 05:21:58
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I'm working with a large application using .Net v3.5 with C# (Visual Studio 2008) that uses the BinaryFormatter to create a data file. Stream stream = File.Open(filePath, FileMode.Create, FileAccess.Write, FileShare.None); BinaryFormatter formatter = new BinaryFormatter(null,

What's a good memory-conservative serializer to replace BinaryFormatter? [closed]

╄→гoц情女王★ 提交于 2019-12-24 05:21:21
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I'm working with a large application using .Net v3.5 with C# (Visual Studio 2008) that uses the BinaryFormatter to create a data file. Stream stream = File.Open(filePath, FileMode.Create, FileAccess.Write, FileShare.None); BinaryFormatter formatter = new BinaryFormatter(null,

WCF XML deserialization is being very picky about namespaces and aliases

我是研究僧i 提交于 2019-12-24 05:15:48
问题 I am writing a .net WCF SOAP service, trying to integrate with a Java client. The process is a bit unusual, because the client has specified the WSDL, and I have to create a service which can accept requests from them. Im getting some very finicky results when we try to perform the integration. Very subtle differences (that appear to be ok to my eyes) cause the XML deserialization to fail. This is the XML actually produced by the client, which ends up giving me null values for all the child

How to serialize the JPanel?

余生颓废 提交于 2019-12-24 05:07:05
问题 So I have this code. And I'm trying to implement click to save on the JMenuBar and click to load. I am having trouble serializing the JPanel . How could I save the current plot view? the layout is set to AbsoluteLayout so the GroupLayout issue is not a problem. I've read through Google searches and I know this is not recommended but how else could I save and load it? package tester; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Shape; import java

Deserializing XML into class C#

对着背影说爱祢 提交于 2019-12-24 04:39:44
问题 I have some XML which i need to deserialize into my object in c# I have come up with this code but its not working it says my PSTNPropsitionItem count is zero: [Serializable] [XmlRoot("Proposition")] public class Proposition { public Proposition() { } [XmlElement("CFWebResponse")] public CFWebResponse CFWebResponse { get; set; } [XmlElement("PropositionItem")] public List<PSTNPropositionItem> Items { get; set; } } [Serializable] [XmlRoot("PropositionItem")] public class PropositionItem {

Problems with the DataContractSerialiser and Serializable

ぐ巨炮叔叔 提交于 2019-12-24 04:33:14
问题 I've a few Classes from a asembly wich is .Net 2.0. These Classes are makred with Serializable. In my Project, i uses this classes in my Classes, wich are marked with DataContract(IsReference=true) and DataMember. Now I have the Problem, with DataContractSerialiser that it serialises the private fields of my .Net 2.0 Classes, wich will not work. But when I use XMLSerialiser, i cannot use IsReference, and so I can also not do this. Is there a easy (simple) Solutiuon for this? Maybe a someone

'boost::archive::archive_exception' what(): unsupported version

╄→гoц情女王★ 提交于 2019-12-24 04:23:26
问题 I cloned this repository: https://github.com/srianant/computer_vision built and ran,got this error: OpenPose/DLIB Gesture, Action and Face Recognition. resolution: 640x480 net_resolution: 656x368 handNetInputSize: 368x368 face_net_resolution: 368x368 cCamera Resolution set to: 640x480 Push following keys: p for pause sample generation f for generating face samples t for train samples c for continue camera feed h for display key commands q for quit program terminate called after throwing an

Store array in cookie

笑着哭i 提交于 2019-12-24 04:21:47
问题 I am converting the array into cookie by php serialize function $PromoteProductArray = array("PromoteuserId"=>$PromoteuserId, "PromoteProductId"=>$PromoteProductId, "PromoteBrandId"=>$PromoteBrandId); $Promotedcart[] = $PromoteProductArray; setcookie("Promotedcart", serialize($Promotedcart), time()+604800,'/'); And when the cookie is created then i am using the unserialize php function. print_r(unserialize($_COOKIE['Promotedcart'])); it does not work. When I print_R($_COOKIE) then it show me

Serialization of derived FixedDocument

会有一股神秘感。 提交于 2019-12-24 04:14:07
问题 Since you can only add pages to a FixedDocument, I wrote a derived class: public class CustomFixedDocument : FixedDocument { public void RemoveChild(object child) { base.RemoveLogicalChild(child); } } to replace FixedDocument, which works fine, until I try to print the document and receive the following error: An unhandled exception of type 'System.Windows.Xps.XpsSerializationException' occurred in ReachFramework.dll Additional information: Serialization of this type of object is not

serialize object for unit testing

烈酒焚心 提交于 2019-12-24 03:43:14
问题 Assuming in a unit test I need to have an object all of 50 fields of which are set up with some values. I don't want to manually set up all this fields, as it takes time and annoying... Somehow I need to get an instance where all the fields are initialized by some not-null values. and I had an idea - what if I will debug some code, at some point i will get a working instance of this object with some data set up - and I just will serialize it to the disk. Then I will put this file to test