diff --git a/src/Hyperbee.Json/Filters/Parser/FilterParser.cs b/src/Hyperbee.Json/Filters/Parser/FilterParser.cs index ff9ba1a6..b7853f0c 100644 --- a/src/Hyperbee.Json/Filters/Parser/FilterParser.cs +++ b/src/Hyperbee.Json/Filters/Parser/FilterParser.cs @@ -384,7 +384,7 @@ static ExpressionConverter() var accessorParam = Expression.Parameter( typeof( IValueAccessor ), "accessor" ); var expressionParam = Expression.Parameter( typeof( IEnumerable ), "expression" ); - var methodInfo = typeof(IValueAccessor).GetMethod( nameof( IValueAccessor.GetAsValue ) ); + var methodInfo = typeof( IValueAccessor ).GetMethod( nameof( IValueAccessor.GetAsValue ) ); var callExpression = Expression.Call( accessorParam, methodInfo!, expressionParam ); GetAsValueDelegate = Expression.Lambda, IEnumerable, object>>( diff --git a/test/Hyperbee.Json.Tests/Parsers/FilterParserTests.cs b/test/Hyperbee.Json.Tests/Parsers/FilterParserTests.cs index 4ddbe4df..ed697baa 100644 --- a/test/Hyperbee.Json.Tests/Parsers/FilterParserTests.cs +++ b/test/Hyperbee.Json.Tests/Parsers/FilterParserTests.cs @@ -127,12 +127,12 @@ public void Should_MatchExpectedResult_WhenUsingFunctions( string filter, bool e [DataTestMethod] [DataRow( "length(@.store.book) == 4 ", true, typeof( JsonElement ) )] - [DataRow( "length (@.store.book) == 4 ", true, typeof(JsonElement) )] + [DataRow( "length (@.store.book) == 4 ", true, typeof( JsonElement ) )] [DataRow( " length(@.store.book) == 4", true, typeof( JsonElement ) )] [DataRow( " length(@.store.book) == 4 ", true, typeof( JsonElement ) )] [DataRow( " length( @.store.book ) == 4 ", true, typeof( JsonElement ) )] [DataRow( "4 == length( @.store.book ) ", true, typeof( JsonElement ) )] - [DataRow( "4 == length ( @.store.book ) ", true, typeof(JsonElement) )] + [DataRow( "4 == length ( @.store.book ) ", true, typeof( JsonElement ) )] [DataRow( " 4 == length(@.store.book)", true, typeof( JsonElement ) )] [DataRow( " 4 == length(@.store.book) ", true, typeof( JsonElement ) )] [DataRow( " 4 == length( @.store.book ) ", true, typeof( JsonElement ) )] @@ -192,7 +192,7 @@ private static bool Execute( Expression expression, ParameterExpression param, T return func( new JsonElement() ); } - + if ( sourceType == typeof( JsonNode ) ) { var func = Expression