Supported Types
This page summarizes built-in and generated type support in Apache Fory™ C#.
Primitive Types
| C# Type | Notes |
|---|---|
bool | Supported |
sbyte, short, int, long | Supported |
byte, ushort, uint, ulong | Supported |
float, double | Supported |
string | Supported |
byte[] | Supported |
Nullable primitives (for example int?) | Supported |
Arrays
- Primitive numeric arrays (
bool[],int[],ulong[], etc.) byte[]- General arrays (
T[]) through collection serializers
Collections
List-like
List<T>LinkedList<T>Queue<T>Stack<T>
Set-like
HashSet<T>SortedSet<T>ImmutableHashSet<T>
Map-like
Dictionary<TKey, TValue>SortedDictionary<TKey, TValue>SortedList<TKey, TValue>ConcurrentDictionary<TKey, TValue>NullableKeyDictionary<TKey, TValue>
Time Types
| C# Type | Wire Type |
|---|---|
DateOnly | Date |
DateTime | Timestamp |
DateTimeOffset | Timestamp |
TimeSpan | Duration |
User Types
[ForyObject]classes/structs/enums via source-generated serializers- Custom serializer types registered through
Register<T, TSerializer>(...) Union/Union2<...>typed union support
Dynamic Types
Dynamic object payloads via Serialize<object?> / Deserialize<object?> support:
- Primitive/object values
- Dynamic lists/sets/maps
- Nested dynamic structures
Notes
- User-defined types should be registered explicitly.
- For cross-language usage, follow the xlang guide.