File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
src/core/Synapse.Integration/Serialization/Converters Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 17
17
18
18
using Newtonsoft . Json ;
19
19
using Newtonsoft . Json . Converters ;
20
- using Newtonsoft . Json . Serialization ;
21
20
using System . Dynamic ;
22
21
23
22
namespace Synapse . Integration . Serialization . Converters
@@ -30,30 +29,16 @@ public class FilteredExpandoObjectConverter
30
29
: ExpandoObjectConverter
31
30
{
32
31
33
- /// <summary>
34
- /// Initializes a new <see cref="FilteredExpandoObjectConverter"/>
35
- /// </summary>
36
- /// <param name="namingStrategy">The <see cref="Newtonsoft.Json.Serialization.NamingStrategy"/> to use</param>
37
- public FilteredExpandoObjectConverter ( NamingStrategy namingStrategy = null )
38
- {
39
- this . NamingStrategy = namingStrategy ?? new CamelCaseNamingStrategy ( ) ;
40
- }
41
-
42
32
/// <inheritdoc/>
43
33
public override bool CanWrite => true ;
44
34
45
- /// <summary>
46
- /// Gets the <see cref="Newtonsoft.Json.Serialization.NamingStrategy"/> to use
47
- /// </summary>
48
- protected NamingStrategy NamingStrategy { get ; }
49
-
50
35
/// <inheritdoc/>
51
36
public override void WriteJson ( JsonWriter writer , object value , Newtonsoft . Json . JsonSerializer serializer )
52
37
{
53
38
var expando = ( IDictionary < string , object > ) value ;
54
39
var dictionary = expando
55
40
. Where ( p => p . Value is not null )
56
- . ToDictionary ( p => this . NamingStrategy . GetPropertyName ( p . Key , false ) , p => p . Value ) ;
41
+ . ToDictionary ( p => p . Key , p => p . Value ) ;
57
42
serializer . Serialize ( writer , dictionary ) ;
58
43
}
59
44
You can’t perform that action at this time.
0 commit comments