ObservableCollection<bool> col = new ObservableCollection<bool>();
col.Add(true);
col.Add(false);
string json = System.Text.Json.JsonSerializer.Serialize(col, typeof(ObservableCollection<bool>));
ObservableCollection<bool> result = (ObservableCollection<bool>)System.Text.Json.JsonSerializer.Deserialize(json, typeof(ObservableCollection<bool>));
System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.ICollection`1[System.Boolean]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
at System.Text.Json.ThrowHelper.ThrowJsonException(String message, Utf8JsonReader& reader, String path, Exception innerException)
at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType, Utf8JsonReader& reader, String path, Exception innerException)
at System.Text.Json.ReadStackFrame.CreateEnumerableValue(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.HandleStartArray(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
at System.Text.Json.JsonSerializer.ParseCore(String json, Type returnType, JsonSerializerOptions options)
at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)`
If I can help with more information please just ask.
Preview 8 System.Text.Json error deserializing ObservableCollection
Example
Result is an exception;
If I can help with more information please just ask.