diff --git a/src/LitJson/JsonMapper.cs b/src/LitJson/JsonMapper.cs index 0fc106a..4c261b8 100644 --- a/src/LitJson/JsonMapper.cs +++ b/src/LitJson/JsonMapper.cs @@ -832,11 +832,12 @@ private static void WriteValue (object obj, JsonWriter writer, } else { PropertyInfo p_info = (PropertyInfo) p_data.Info; - if (p_info.CanRead) { - writer.WritePropertyName (p_data.Info.Name); - WriteValue (p_info.GetValue (obj, null), - writer, writer_is_private, depth + 1); + object prop_obj = p_info.GetValue(obj, null); + if (prop_obj != obj) { + writer.WritePropertyName (p_data.Info.Name); + WriteValue (prop_obj, writer, writer_is_private, depth + 1); + } } } }