中文 | English
DanKeJson is a simple .Net library to handle conversions from and to JSON (JavaScript Object Notation) strings.
DanKeJson has incorporated a variety of features to facilitate development, including but not limited to:
- Data transmission via the JsonData class
- Implicit conversion operators
- Tolerance for superfluous commas in arrays and objects
- Single quotes are permissible in strings.
- Comment allowance*
- Conversion of undefined values to null
- Key name allows no quotation marks
For more information on features, please refer to: Hello DanKeJson
*Note: The current version of DanKeJson's parser does not fully support comments. Comment support is handled by the CommentParser class using regular expressions, which may significantly impact parsing performance.
Deserialization:
- Parser support for single-line and multi-line comments
- Support for date formats
- Support more dotnet version
- Allow key names without quotes
- Support for single quotes in strings
- Allow trailing commas in arrays and objects
Serialization:
- Support for serializing to JSON5 format
Windows
./publish.bat
NuGet\Install-Package DanKeJson -Version 1.4.1
dotnet add package DanKeJson --version 1.4.1
<PackageReference Include="DanKeJson" Version="1.4.1" />
paket add DanKeJson --version 1.4.1
#r "nuget: DanKeJson, 1.4.1"
// Install DanKeJson as a Cake Addin
#addin nuget:?package=DanKeJson&version=1.4.1
// Install DanKeJson as a Cake Tool
#tool nuget:?package=DanKeJson&version=1.4.1
Alternatively, just copy the whole tree of files under ./publish/DanKeJson
to your own project's source tree and integrate it with your development environment.
DanKeJson currently targets and supports
- .NET 9.0
- .NET 8.0
- .NET 7.0
- .NET 6.0
- .NET 5.0
- .NET Standard 2.1
- .NETcoreapp3.1
- .NETcoreapp3.0
- Godot (.Net)
- Mono
- Unity
MIT License
Copyright (c) 2023 - present DanKe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This project was developed using Rider, and we extend our gratitude to JetBrains for their support of DanKeJson.
All Markdown files in this project were written using Hypora.