tghamm / dynamic-linq-query-builder

A truly generic and dynamic linq query builder to compliment jQuery QueryBuilder and other dynamic linq query generation needs
MIT License
262 stars 110 forks source link

Update QueryBuilderFilterRule.cs #87

Closed markikordahi closed 2 years ago

markikordahi commented 2 years ago

Add Constructor that accepts a json string. this is helpful when user wants to pass this object as a queryparamter with GET

tghamm commented 2 years ago

Hi @markikordahi does this add a dependency on Newtonsoft to this lib?

markikordahi commented 2 years ago

I believe yes it does

tghamm commented 2 years ago

@markikordahi I'm weary of adding that as a dependency for the project. While it may be convenient, not all consumers use that particular serializer, in fact we have an entirely separate library for System.Text.Json because lots of people use that, and wouldn't appreciate the added dependency.

markikordahi commented 2 years ago

I can use System.text.Json however it was introduce in .net Core 3.1 and was not available for .Net Core 2.1 and earlier. correct me if i'm wrong.. Although i understand your concern over adding a new dependency.. shall I go ahead and close this PR then?

tghamm commented 2 years ago

I think it might be more appropriate to implement your own implementation of IFilterRule that accomplishes this in this case. I'll close the PR, but I do appreciate the effort. I've merged your first PR, and I added a test for it. If you can include a test for your second PR, I'll merge that one in as well, as I think that one makes sense as well.