Riverside.JsonBinder
1.1.0
dotnet add package Riverside.JsonBinder --version 1.1.0
NuGet\Install-Package Riverside.JsonBinder -Version 1.1.0
<PackageReference Include="Riverside.JsonBinder" Version="1.1.0" />
paket add Riverside.JsonBinder --version 1.1.0
#r "nuget: Riverside.JsonBinder, 1.1.0"
// Install Riverside.JsonBinder as a Cake Addin #addin nuget:?package=Riverside.JsonBinder&version=1.1.0 // Install Riverside.JsonBinder as a Cake Tool #tool nuget:?package=Riverside.JsonBinder&version=1.1.0
🧩 Riverside.JsonBinder
Riverside.JsonBinder
is a .NET based library that generates language-specific class representations from JSON input. It supports multiple programming languages.
✨ Features
- Converts JSON into class representations for:
- C#, Python, Java, JavaScript, TypeScript, PHP, Ruby, and Swift.
- Multi-language selection for simultaneous generation.
- User-friendly interface with detailed error handling.
🛠️ Usage
📚 Using the Library
To use the library in your .NET project, include the Riverside.JsonBinder
namespace and call the static method JsonSerializer.ConvertTo
:
using Riverside.JsonBinder;
string json = "{ \"Name\": \"John\", \"Age\": 30 }";
string result = JsonSerializer.ConvertTo(json, SerializableLanguage.CSharp);
Console.WriteLine(result);
This method takes two parameters:
json
: A string containing the JSON input.language
: An enum specifying the target SerializableLanguage
Supported languages include:
SerializableLanguage.CSharp
SerializableLanguage.Python
SerializableLanguage.Java
SerializableLanguage.JavaScript
SerializableLanguage.TypeScript
SerializableLanguage.PHP
SerializableLanguage.Ruby
SerializableLanguage.Swift
You can use the output directly in your projects or customize it as needed.
🚀 Running the Test Program
To see the library in action:
- Compile the solution using your chosen TFM.
- Run the
Riverside.JsonBinder.Console
project. - Use the interactive menu to input JSON and select target languages.
The program will display the generated classes for the chosen languages in an organized format.
- ❌ Invalid JSON displays an error in red and returns to the main menu.
📋 Requirements
- Any version of .NET
- Basic understanding of JSON and object-oriented programming.
⚖️ License
This project, including the library Riverside.JsonBinder
, is licensed under the MIT License. You are free to use, modify, and distribute the software, provided you adhere to the terms of the license.
Crafted with the help of AI magic.
GPT4o & Claude 3.5 Sonnet.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 is compatible. 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 is compatible. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8.1
- System.Text.Json (>= 9.0.1)
-
.NETStandard 2.0
- System.Text.Json (>= 9.0.1)
-
.NETStandard 2.1
- System.Text.Json (>= 9.0.1)
-
net8.0
- System.Text.Json (>= 9.0.1)
-
net9.0
- System.Text.Json (>= 9.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.