Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hgruniaux/json-writer
https://github.com/hgruniaux/json-writer
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hgruniaux/json-writer
- Owner: hgruniaux
- License: mit
- Created: 2023-05-21T14:46:35.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-05-21T16:57:27.000Z (over 1 year ago)
- Last Synced: 2024-11-07T20:54:46.664Z (about 2 months ago)
- Language: C++
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Json-Writer
A simple single header file [json_writer.hpp](json_writer.hpp) to help writing [JSON](https://www.json.org/) code easily with pretty formatting and even colors in terminals !
Calling the demo program (the [main.cpp](main.cpp) file) gives :
```json
{
"name": "Bob",
"age": 42,
"is_adult": true,
"height": 175.6,
"children": [
{
"name": "Alice",
"age": 10,
"is_adult": false
},
{
"name": "Charlie",
"age": 8,
"is_adult": false
}
],
"extra": null
}
```Json-Writer is able to output colors [(SGR colors)](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) for terminals if requested.
## License
This project is licensed under the terms of the MIT license.