JsonQL 1.0.0-rc1
This is a prerelease version of JsonQL.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package JsonQL --version 1.0.0-rc1
NuGet\Install-Package JsonQL -Version 1.0.0-rc1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JsonQL" Version="1.0.0-rc1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JsonQL" Version="1.0.0-rc1" />
<PackageReference Include="JsonQL" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JsonQL --version 1.0.0-rc1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: JsonQL, 1.0.0-rc1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JsonQL@1.0.0-rc1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JsonQL&version=1.0.0-rc1&prerelease
#tool nuget:?package=JsonQL&version=1.0.0-rc1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NOTE, following is a very high level description of JsonQL. For more details please refer to examples in JsonQL.Demo and JsonQL.Tests projects in https://github.com/artakhak/JsonQL.
# JsonQL
JsonQL is a powerful JSON query language implementation that provides a flexible way to query and manipulate JSON data using a SQL-like syntax with rich function support.
## Features
- Rich set of built-in functions for JSON manipulation
- Support for aggregate functions (COUNT, AVG, MIN, MAX, SUM)
- Collection manipulation with ANY and ALL operations
- String operations (ToUpper, ToLower, Length, Concatenate, etc)
- Type conversion functions (DateTime, Date, Double, Int, Boolean, String)
- Mathematical operations (Abs, IsEven, IsOdd)
- Object property inspection (HasField)
- Lambda expression support for complex queries
- Extensible function architecture
- Built-in conversion of query results to C# objects
-Also, allows auto-binding interfaces to default implementations or non-default implementations via configuration
- Mutating JSON files by replacing Json field values by evaluated Json values
- Extending the API to provide custom operators, functions, as well as customizing any part of JsonQL implementation
## Built-in Functions
### Aggregate Functions
- `Count()` - Counts elements in a collection
- `Average()` - Calculates average of numeric values
- `Min()` - Finds minimum value
- `Max()` - Finds maximum value
- `Sum()` - Calculates sum of numeric values
- `All()` - Tests if all elements match a condition
- `Any()` - Tests if any elements match a condition
### String Functions
- `Lower()` - Converts text to lowercase
- `Upper()` - Converts text to uppercase
- `Length()` - Returns text length
- `Concatenate()` - Joins multiple strings
### Conversion Functions
- `ConvertToDateTime()` - Converts to DateTime
- `ConvertToDate()` - Converts to Date
- `ConvertToDouble()` - Converts to Double
- `ConvertToInt()` - Converts to Integer
- `ConvertToBoolean()` - Converts to Boolean
- `ConvertToString()` - Converts to String
### Mathematical Functions
- `Abs()` - Returns absolute value
- `IsEven()` - Checks if number is even
- `IsOdd()` - Checks if number is odd
### Object Functions
- `HasField()` - Checks if JSON object has specified field
## Built-in Operators
- `.` - Accesses field value
- `!` - Negate operator
- `==` - Equals operator
- `!=` - Is not equal operator
- `>` - Greater than operator
- `>=` - Greater than or equal operator
- `<` - Less than operator
- `<=` - Less than or equal operator
- `&&` - Logical 'and' operator
- `*` - Multiply operator
- `/` - Divide operator
- `+` - Add operator
- `-` - Subtract operator or negative number operator depedning where it is used. Exampels: "-5", "a.Age-5".
- `%` - Quotient operator
- `->` - Named parameter specification operator. Allows changing the odrer of parameters. Usefull with some parameters being optional. Example: ReverseTextAndAddMarkers(addMarkers->false, value->TestData[4])
- `=>` - Lambda operator
- `contains` - Contains operator
- `starts with` - Starts with operator
- `ends with` - Ends with operator
- `contains` - Contains operator
- `contains` - Contains operator
- `contains` - Contains operator
- `is null` - 'is null' operator
- `is not null` - 'is not null' operator
- `is undefined` - 'is undefined' operator
- `is not undefined` - 'is not undefined' operator
- `typeof` - 'typeof' operator. Example "typeof person.Age"
NOTE: Documentation will be improved in near future to demonstrate good exanples. Before that is done, reference examples in unit tests in project JosnQL.Tests as well as examples in JsonQL.Demos.
## License
This project is licensed under the MIT License - see the LICENSE file in the solution root for details.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
- OROptimizer.Shared (>= 2.5.0)
- UniversalExpressionParser (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Small fix to README.md