Tags "deserialization" Result

JSON.NET (WebApi2) - Serialize property, but skip during deserialization

I know of [JsonIgnore] which ignores properties altogether, I know of ShouldSerializePropertyName which gives conditional serialization, but I cannot find anything to mark property to be serialized into JSON normally, but not set during deserialization. I could write a workaround: [JsonIgnore] public string MyValue{get;set;} public string MyValu

it1352 2 2019-05-06

serialization/deserialization mechanism

Say, I have a class X which has a field value, that is, class X implements Serializable { private int value; // ... } Further it has getters and setters not displayed here. This class is serialized. At the deserialzation, end same class has value field and access specifier is public. Further, this class does not have getters and setters.

it1352 3 2019-05-22

How can a Delphi TForm / TPersistent object calculate its own construction and deserialization time?

For performance tests I need a way to measure the time needed for a form to load its definition from the DFM. All existing forms inherit a custom form class. To capture the current time, this base class needs overriden methods as "extension points": start of the deserialization process after the deserialization (can be implemented by overriding

it1352 1 2019-05-17

Different names of JSON property during serialization and deserialization

Is it possible: to have one field in class, but different names for it during serialization/deserialization in Jackson library? For example, I have class "Coordiantes". class Coordinates{ int red; } For deserialization from JSON want to have format like this: { "red":12 } But when I will serialize object, result should be like this one:

it1352 3 2019-05-21

XML Deserialization

Is there a way to be notified when the deserialization of an XML is complete, like a callback method? I tried the IDeserializationCallback interface, but that doesnt for XML-Deserialization. thanks josh Solution Use a synchronous overload of the XmlSerializer.Deserialize method; when it returns, it is finished. -- HTH, Kevin Spencer Microsoft

it1352 3 2019-06-27

C - boost::any serialization

As far as I understand, there is no serialization (boost::serialization, actually) support for boost::any placeholder. Does someone know if there is a way to serialize a custom boost::any entity? The problem here is obvious: boost::any uses template-based placeholders to store objects and typeid to check if boost::any_cast is appropriate. So, th

it1352 4 2019-05-10