Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esskar/serialize.linq
C# library to serialize LINQ expressions
https://github.com/esskar/serialize.linq
c-sharp dotnet json linq rest serializing-linq-expressions xml
Last synced: 3 days ago
JSON representation
C# library to serialize LINQ expressions
- Host: GitHub
- URL: https://github.com/esskar/serialize.linq
- Owner: esskar
- License: mit
- Created: 2012-09-10T23:06:02.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2024-09-29T09:07:09.000Z (3 months ago)
- Last Synced: 2024-12-13T11:09:27.564Z (10 days ago)
- Topics: c-sharp, dotnet, json, linq, rest, serializing-linq-expressions, xml
- Language: C#
- Homepage:
- Size: 5.19 MB
- Stars: 507
- Watchers: 33
- Forks: 105
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Serialize.Linq
Serialize.Linq is a .NET library that provides functionality to serialize and deserialize LINQ expressions.
This library is useful in scenarios where you need to send LINQ expressions over the wire or persist them in a database.## Features
- Serialize and deserialize LINQ expressions to XML, JSON, and binary formats.
- Supports various types of expressions, including binary, unary, member access, lambda, and more.
- Extensible design that allows you to add support for custom expressions.## Getting Started
### Installation
You can install Serialize.Linq via [NuGet][1]:
```
Install-Package Serialize.Linq
```### Usage
Here's a simple example of how to use Serialize.Linq:
```csharp
// Create an expression
Expression> expression = num => num < 5;// Create a serializer
var serializer = new ExpressionSerializer(new JsonSerializer());// Serialize the expression
string serializedExpression = serializer.SerializeText(expression);// Deserialize the expression
var deserializedExpression = serializer.DeserializeText(serializedExpression);
```## Contributing
We welcome contributions to Serialize.Linq!
If you'd like to contribute, please fork the repository, make your changes, and submit a pull request.
If you're not sure where to start, take a look at our open issues.For bugs: make sure you create a unit test, so it is easier for me to reproduce and fix it.
You can always [buy me a coffee :coffee:][2].
## Testing
Serialize.Linq has a comprehensive test suite. You can run the tests using your preferred test runner.
## Supported Platforms (or known to work with)
- .NET 8.0
- .NET 7.0
- .NET 6.0
- .NET 4.8
- .NET 4.8.1## License
Serialize.Linq is licensed under the MIT License. See the LICENSE file for more details.
[1]: http://nuget.org/packages/Serialize.Linq
[2]: https://www.buymeacoffee.com/esskar