Questions tagged [sharpserializer]
6 questions
2
votes
0 answers
Ignore a Type during Deserialization with SharpSerializer
Is it possible to ignore a certain type if a exception is thrown during Deserialization?
I can add Properties to ignore like so:
var setting = new SharpSerializerXmlSettings();
setting.AdvancedSettings.PropertiesToIgnore.Add(type,…

Tobias
- 35,886
- 1
- 20
- 23
1
vote
1 answer
SharpSerializer: Ignore attributes/properties from deserialization
I am using SharpSerializer to serialize/deserialize object.
I want the ability to ignore specific properties when deserializing.
SharpSerializer has an option to ignore properties by attribute or by classes and property…

Eliahu Aaron
- 4,103
- 5
- 27
- 37
1
vote
1 answer
C# deserializing using SharpSerializer results in exception
I'm serializing a list of ObservableCollection using this line of code and it works fine:
var serializer = new SharpSerializer(true);
serializer.Serialize(myList, myStreamObject);
The problem occurs when I try to deserialize my data.
var…

Richard
- 14,427
- 9
- 57
- 85
0
votes
0 answers
Deserialize Arraylist of Arraylist with SharpSerializer
My code:
//object
var obj = new object() { ID = 111, Money = 111};
//this i want serialize/deserialize, this arraylist contains arraylist with objects
ArrayList SerializeArrayListOfArrayList = new ArrayList();
ArrayList array =…

Černý Adam
- 3
- 1
- 4
0
votes
0 answers
How I can Ignore Null properties to be serialized using SharpSerializer
I am using SharpSerializer to serialize my objects to XML. By default all public properties are serialized.
Is it possible to exclude null-values from serialization?
For example:
public class Test
{
public int Id {get;set;}
public string Text…

vishal
- 596
- 2
- 12
- 31
0
votes
2 answers
TargetInvocationException when serializeing with SharpSerializer
I am trying to serialize with sharpSerializer. But I get TargetInvocationException and InnerException as UnauthorizedAccessException: "Invalid cross-thread access".
Here my code for serializing:
public static async Task Save(this T obj, string…

Rishabh876
- 3,010
- 2
- 20
- 37