Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Commit

Permalink
Update ReflectionExtensions.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Sep 26, 2019
1 parent 12ab8c6 commit 63939b8
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/ServiceStack.Text/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -595,12 +595,19 @@ internal static void Reset()
"JsonIgnoreAttribute"
};

JsConfig<Type>.SerializeFn = x => x?.ToString();
JsConfig<MethodInfo>.SerializeFn = x => x?.ToString();
JsConfig<PropertyInfo>.SerializeFn = x => x?.ToString();
JsConfig<FieldInfo>.SerializeFn = x => x?.ToString();
JsConfig<MemberInfo>.SerializeFn = x => x?.ToString();
JsConfig<ParameterInfo>.SerializeFn = x => x?.ToString();
try
{
JsConfig<Type>.SerializeFn = x => x?.ToString();
JsConfig<MethodInfo>.SerializeFn = x => x?.ToString();
JsConfig<PropertyInfo>.SerializeFn = x => x?.ToString();
JsConfig<FieldInfo>.SerializeFn = x => x?.ToString();
JsConfig<MemberInfo>.SerializeFn = x => x?.ToString();
JsConfig<ParameterInfo>.SerializeFn = x => x?.ToString();
}
catch (Exception e)
{
Tracer.Instance.WriteError("ReflectionExtensions JsConfig<Type>", e);
}
}

public static PropertyInfo[] GetSerializableProperties(this Type type)
Expand Down

0 comments on commit 63939b8

Please sign in to comment.