ZY.Lime
1.0.0
dotnet add package ZY.Lime --version 1.0.0
NuGet\Install-Package ZY.Lime -Version 1.0.0
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="ZY.Lime" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ZY.Lime --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ZY.Lime, 1.0.0"
#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.
// Install ZY.Lime as a Cake Addin #addin nuget:?package=ZY.Lime&version=1.0.0 // Install ZY.Lime as a Cake Tool #tool nuget:?package=ZY.Lime&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lime
Lime Fresh and Zesty Query String Management for .NET
Just like a squeeze of lime adds zest to a dish, Lime brings a fresh approach to managing query strings in .NET. Featuring modern .NET development practices like nullable reference types, async/await, and fluent interfaces for a smooth developer experience.
Features
- Parse query strings into dictionaries and nested objects.
- Convert dictionaries to query strings with customizable formatting options.
- Support for different array serialization formats (e.g., brackets, indices, repeat, comma).
- Configurable encoding and decoding using RFC3986 or RFC1738 standards.
- Flexible compaction options to clean up data.
Installation
Install the package from NuGet:
dotnet add package ZY.Lime --version 1.0.0
Usage
Parsing a Query String
using Lime.Extensions;
string queryString = "?name=John&age=30&skills[]=CSharp&skills[]=JavaScript";
var parsedData = await queryString.ParseQueryStringAsync();
foreach (var item in parsedData)
{
Console.WriteLine($"{item.Key}: {item.Value}");
}
Stringify a Dictionary
using Lime.Extensions;
using System.Collections.Generic;
var data = new Dictionary<string, object?>
{
{ "name", "John Doe" },
{ "age", 30 },
{ "skills", new List<string> { "CSharp", "JavaScript" } }
};
string queryString = await data.ToQueryStringAsync();
Console.WriteLine(queryString);
Configuration
var options = new LimeOptions()
.SetFormatHandler(new Rfc1738FormatHandler()) // Use RFC1738 encoding
.UseParserOptions(new ParserOptions { AllowDots = true })
.UseStringifierOptions(new StringifierOptions { ArrayFormat = ArrayFormat.Brackets });
var manager = new QueryStringManager(options);
License
This project is licensed under the MIT License.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 85 | 10/17/2024 |