# Welcome to taoJSON
[![Windows CI](https://github.com/taocpp/json/workflows/Windows/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3AWindows)
[![macOS CI](https://github.com/taocpp/json/workflows/macOS/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3AmacOS)
[![Linux CI](https://github.com/taocpp/json/workflows/Linux/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3ALinux)
[![Android CI](https://github.com/taocpp/json/workflows/Android/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3AAndroid)
<br>
[![clang-analyze](https://github.com/taocpp/json/workflows/clang-analyze/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3Aclang-analyze)
[![clang-tidy](https://github.com/taocpp/json/workflows/clang-tidy/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3Aclang-tidy)
[![Sanitizer](https://github.com/taocpp/json/workflows/Sanitizer/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3ASanitizer)
[![CodeQL](https://github.com/taocpp/json/workflows/CodeQL/badge.svg)](https://github.com/taocpp/json/actions?query=workflow%3ACodeQL)
[![Code Coverage](https://codecov.io/gh/taocpp/json/branch/main/graph/badge.svg?token=ykWa8RRdyk)](https://codecov.io/gh/taocpp/json)
taoJSON is a C++ header-only JSON library that provides a generic [Value Class](doc/Value-Class.md), uses [Type Traits](doc/Type-Traits.md) to interoperate with C++ types, uses an [Events Interface](doc/Events-Interface.md) to convert from and to JSON, JAXN, CBOR, MsgPack and UBJSON, and much more...
## Documentation
* [Version 1.x](doc/README.md) (requires C++17)
*Warning: The documentation is currently not quite keeping pace with what will hopefully be the last large pre-1.0.0 development burst.*
## Contact
For questions and suggestions regarding taoJSON, success or failure stories, and any other kind of feedback, please feel free to open a [discussion](https://github.com/taocpp/json/discussions), an [issue](https://github.com/taocpp/json/issues) or a [pull request](https://github.com/taocpp/json/pulls) on GitHub or contact the authors at `taocpp(at)icemx.net`.
## Features
* Supported Standards
* [RFC8259], [ECMA-404]: The JavaScript Object Notation (JSON) Data Interchange Format.
* Achieves a **100%** conformance score in the [Native JSON Benchmark] tests.
* [RFC6901]: JavaScript Object Notation (JSON) Pointer.
* [RFC6902]: JavaScript Object Notation (JSON) Patch.
* [RFC7049]: Concise Binary Object Representation ([CBOR]).
* [JAXN]: Relaxed JSON.
* [MsgPack]: MessagePack binary format (without extensions).
* [UBJSON]: Universal Binary JSON.
* [Value Class](doc/Value-Class.md)
* JSON data model extended with non-finite number values and binary data.
* Construction of objects and arrays via `std::initializer_list`.
* Conversion from and to arbitrary *user-defined types* via [Type Traits](doc/Type-Traits.md).
* Built around STL containers `std::variant`, `std::string`, `std::map`, `std::vector`, etc.
* No memory allocations by the Value class itself (the wrapped containers allocate normally).
* Instance sharing for string, binary, Value, and *user-defined types* via non-owning pointers.
* C++11 literal operator for Values, including binary data.
* Optional [Base class for Values](doc/Advanced-Use-Cases.md#custom-base-class-for-values) (e.g. to [annotate (sub-)values with file and line](doc/Advanced-Use-Cases.md#annotate-with-filename-and-line-number)).
* [Events Interface](doc/Events-Interface.md)
* Simple, straightforward and flexible Events API.
* Events-to-Value and Value-to-Events interfaces.
* Parse JSON & JAXN string representation to Events.
* Stream Events to (prettified) JSON & JAXN string representation.
* Conversion from and to binary formats, currently [CBOR], [UBJSON], [MsgPack].
* Conversion from and to *other* JSON libraries (e.g. [`contrib/nlohmann.cpp`](contrib/nlohmann.cpp)).
* Events comparison, hashing, counting, and schema validation.
* Events Transformers to manipulate Events on-the-fly.
## Status
The library is stable as in "works correctly" over months of multiple real-world applications.
The library is not stable as in "under construction"; some parts of the API are under discussion and development and might change and/or be extended before version 1.0.
This library also serves as a real-world example application of the [Parsing Expression Grammar Template Library (PEGTL)], which is used for parsing the JSON and JAXN representation formats.
## Package Managers
You can download and install taoJSON using the [Conan](https://github.com/conan-io/conan) package manager:
conan install taocpp-json/1.0.0-beta.11@
The taocpp-json package in conan is kept up to date by Conan team members and community contributors.
If the version is out-of-date, please [create an issue or pull request](https://github.com/conan-io/conan-center-index) on the Conan Center Index repository.
## Thank You
* Niels Lohmann and his [JSON library](https://github.com/nlohmann/json) for the inspiration.
* Milo Yip and his [Native JSON Benchmark] for a reference to measure progress against.
## The Art of C++
taoJSON is part of [The Art of C++](https://taocpp.github.io/).
[<img alt="colinh" src="https://avatars.githubusercontent.com/u/113184" width="120">](https://github.com/colinh)
[<img alt="d-frey" src="https://avatars.githubusercontent.com/u/3956325" width="120">](https://github.com/d-frey)
[<img alt="uilianries" src="https://avatars.githubusercontent.com/u/4870173" width="120">](https://github.com/uilianries)
## License
<a href="https://opensource.org/licenses/MIT"><img align="right" src="https://opensource.org/wp-content/uploads/2009/06/OSIApproved.svg" width="150" hspace="20" alt="Open Source Initiative"></a>
taoJSON is certified [Open Source] software.
It may be used for any purpose, including commercial purposes, at absolutely no cost.
It is distributed under the terms of the [MIT license] reproduced here.
> Copyright (c) 2015-2023 Dr. Colin Hirsch and Daniel Frey
>
> 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.
## Additional Licenses
taoJSON contains modified portions of the [double-conversion library](https://github.com/google/double-conversion) which is licensed as follows:
> Copyright 2006-2011, the V8 project authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
>
> * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
> * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
> * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from
没有合适的资源?快使用搜索试试~ 我知道了~
C++ header-only JSON library.zip
共415个文件
hpp:229个
cpp:101个
json:39个
需积分: 5 0 下载量 89 浏览量
2023-12-27
00:38:45
上传
评论
收藏 1.49MB ZIP 举报
温馨提示
C++ header-only JSON library
资源推荐
资源详情
资源评论
收起资源包目录
C++ header-only JSON library.zip (415个子文件)
make_events.cbor 241B
.clang-format 3KB
.clang-tidy 1KB
events_compare.cpp 20KB
binding_array.cpp 14KB
operators.cpp 12KB
jaxn_parse.cpp 11KB
contrib_patch_copy.cpp 11KB
double.cpp 11KB
temporary_parsing.cpp 10KB
contrib_traits.cpp 9KB
value_create.cpp 9KB
contrib_patch_move.cpp 8KB
binding_function.cpp 7KB
binding_object.cpp 7KB
binding_factory.cpp 7KB
jaxn_parts_parser.cpp 7KB
json_parse.cpp 7KB
json_pointer.cpp 7KB
value_basics.cpp 7KB
validate_event_interfaces.cpp 6KB
jaxn_to_cplusplus.cpp 6KB
msgpack.cpp 6KB
cbor.cpp 5KB
contrib_patch_remove.cpp 5KB
contrib_patch_replace.cpp 5KB
ubjson.cpp 5KB
contrib_schema.cpp 5KB
contrib_patch_add.cpp 5KB
object_construction.cpp 4KB
json_ostream.cpp 4KB
integer.cpp 4KB
public_base.cpp 4KB
json_parts_parser.cpp 4KB
self_contained.cpp 4KB
jaxn_ostream.cpp 3KB
value_subscript.cpp 3KB
value_access.cpp 3KB
uri_fragment.cpp 3KB
contrib_patch_test.cpp 3KB
binding_versions.cpp 3KB
events_hash.cpp 2KB
opaque_pointer.cpp 2KB
optional.cpp 2KB
with_arguments.cpp 2KB
test.cpp 2KB
print_double.cpp 2KB
validate_integer.cpp 2KB
contrib_get.cpp 2KB
events_binary_to.cpp 1KB
type.cpp 1KB
printf_doubles.cpp 1KB
contrib_diff.cpp 1KB
contrib_position.cpp 1KB
big_list_of_naughty_strings.cpp 1KB
escape.cpp 1KB
enable_implicit_constructor.cpp 1KB
contrib_reference.cpp 1KB
key_camel_case_to_snake_case.cpp 1KB
validate_utf8.cpp 1KB
sha256.cpp 1KB
benchmark.cpp 1KB
key_snake_case_to_camel_case.cpp 926B
value_ptr.cpp 911B
cbor_parts_parser.cpp 897B
validate_event_order.cpp 856B
sizes.cpp 842B
syntax_only.cpp 779B
events_to_stream.cpp 645B
events_to_string.cpp 595B
msgpack_to_pretty_jaxn.cpp 586B
ubjson_to_pretty_jaxn.cpp 583B
msgpack_to_pretty_json.cpp 580B
ubjson_to_pretty_json.cpp 577B
cbor_to_pretty_jaxn.cpp 577B
jaxn_to_pretty_jaxn.cpp 577B
msgpack_to_ubjson.cpp 573B
ubjson_to_msgpack.cpp 572B
cbor_to_pretty_json.cpp 571B
msgpack_to_cbor.cpp 569B
msgpack_to_jaxn.cpp 569B
ubjson_to_jaxn.cpp 566B
cbor_to_msgpack.cpp 566B
jaxn_to_msgpack.cpp 566B
ubjson_to_cbor.cpp 566B
json_to_pretty_json.cpp 565B
jaxn_to_ubjson.cpp 564B
cbor_to_ubjson.cpp 564B
msgpack_to_json.cpp 563B
json_to_msgpack.cpp 560B
ubjson_to_json.cpp 560B
cbor_to_jaxn.cpp 560B
jaxn_to_jaxn.cpp 560B
jaxn_to_cbor.cpp 560B
json_to_ubjson.cpp 558B
events_debug.cpp 557B
json_to_cbor.cpp 554B
cbor_to_json.cpp 554B
json_to_json.cpp 548B
pretty_print_file.cpp 507B
共 415 条
- 1
- 2
- 3
- 4
- 5
资源评论
Lei宝啊
- 粉丝: 2015
- 资源: 1330
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功