@@ -13,7 +13,7 @@ public static class FreeSqlJsonMapCoreExtensions
1313{
1414 static int _isAoped = 0 ;
1515 static ConcurrentDictionary < Type , bool > _dicTypes = new ConcurrentDictionary < Type , bool > ( ) ;
16- static MethodInfo MethodJsonConvertDeserializeObject = typeof ( JsonConvert ) . GetMethod ( "DeserializeObject" , new [ ] { typeof ( string ) , typeof ( Type ) } ) ;
16+ static MethodInfo MethodJsonConvertDeserializeObject = typeof ( JsonConvert ) . GetMethod ( "DeserializeObject" , new [ ] { typeof ( string ) , typeof ( Type ) , typeof ( JsonSerializerSettings ) } ) ;
1717 static MethodInfo MethodJsonConvertSerializeObject = typeof ( JsonConvert ) . GetMethod ( "SerializeObject" , new [ ] { typeof ( object ) , typeof ( JsonSerializerSettings ) } ) ;
1818 static ConcurrentDictionary < Type , ConcurrentDictionary < string , bool > > _dicJsonMapFluentApi = new ConcurrentDictionary < Type , ConcurrentDictionary < string , bool > > ( ) ;
1919 static object _concurrentObj = new object ( ) ;
@@ -44,7 +44,7 @@ public static void UseJsonMap(this IFreeSql fsql, JsonSerializerSettings setting
4444 if ( _dicTypes . ContainsKey ( type ) ) return Expression . IfThenElse (
4545 Expression . TypeIs ( valueExp , type ) ,
4646 Expression . Return ( returnTarget , valueExp ) ,
47- Expression . Return ( returnTarget , Expression . TypeAs ( Expression . Call ( MethodJsonConvertDeserializeObject , Expression . Convert ( valueExp , typeof ( string ) ) , Expression . Constant ( type ) ) , type ) )
47+ Expression . Return ( returnTarget , Expression . TypeAs ( Expression . Call ( MethodJsonConvertDeserializeObject , Expression . Convert ( valueExp , typeof ( string ) ) , Expression . Constant ( type ) , Expression . Constant ( settings ) ) , type ) )
4848 ) ;
4949 return null ;
5050 } ) ;
0 commit comments