Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/Upgrading to CSLA 9.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ This includes:
* `char[]`
* `List<int>`

> ⚠️ Other generic collection types such as `List<string>`, `Dictionary<K,V>`, etc. are _not_ directly serializable by `SerializationInfo`. For serializable collections in business object properties, use `MobileList<T>` or `MobileDictionary<K,V>` from `Csla.Core`, or register a custom serializer for your type.

If you look at the implementation of [PocoSerializer](https://github.com/MarimerLLC/csla/blob/main/Source/Csla/Serialization/Mobile/CustomSerializers/PocoSerializer.cs) you'll see that it relies on `System.Text.Json` to serialize and deserialize the object, and stores the JSON string in the `SerializationInfo` instance.

The [ClaimsPrincipalSerializer](https://github.com/MarimerLLC/csla/blob/main/Source/Csla/Serialization/Mobile/CustomSerializers/ClaimsPrincipalSerializer.cs) type has two implementations.
Expand Down
4 changes: 3 additions & 1 deletion docs/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ The default serializer for CSLA (version 6 and later) is `MobileFormatter`. This

### Using MobileFormatter

MobileFormatter supports many basic .NET types, including "primitive" types like `int`, `string`, `DateTime`, etc. It also supports `List<T>`, `Dictionary<K,V>`, and other common collection types. It also supports any type that implements `IMobileObject`, which includes all CSLA base types.
MobileFormatter supports many basic .NET types, including "primitive" types like `int`, `string`, `DateTime`, etc. It also supports any type that implements `IMobileObject`, which includes all CSLA base types.

> ⚠️ Standard .NET collection types such as `List<T>` and `Dictionary<K,V>` are _not_ directly serializable by `MobileFormatter`. Use `MobileList<T>` or `MobileDictionary<K,V>` from `Csla.Core` for serializable collections, or register a custom serializer for your collection type.

If you create your complex types by subclassing CSLA base types and using the managed property syntax, you don't need to do anything special to support serialization.

Expand Down