https://github.com/erbsland-dev/erbsland-qt-toml
A robust TOML parser compatible with the Qt5 or Qt6 library.
https://github.com/erbsland-dev/erbsland-qt-toml
cmake cpp cpp17 cpp20 cpp23 qt5 qt6 toml toml-config toml-parser toml-parsing
Last synced: 6 months ago
JSON representation
A robust TOML parser compatible with the Qt5 or Qt6 library.
- Host: GitHub
- URL: https://github.com/erbsland-dev/erbsland-qt-toml
- Owner: erbsland-dev
- License: gpl-3.0
- Created: 2023-05-05T16:12:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T15:42:32.000Z (about 2 years ago)
- Last Synced: 2024-05-16T16:38:00.459Z (about 2 years ago)
- Topics: cmake, cpp, cpp17, cpp20, cpp23, qt5, qt6, toml, toml-config, toml-parser, toml-parsing
- Language: C++
- Homepage: https://erbsland-dev.github.io/erbsland-qt-toml/
- Size: 3.28 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.LESSER.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Erbsland Qt TOML Parser Overview
Welcome to the Erbsland Qt TOML Parser, a highly reliable and secure TOML parser that integrates seamlessly with both Qt5 and Qt6 environments. This parser is fully aligned with the TOML 1.0 specification and is also compatible with the current draft of TOML 1.1. Designed with a modern and clean C++ code base, it promises ease of inspection and understanding.
A distinctive feature of this parser is its inherent strict and dependable UTF-8 parsing, which operates independently of the Qt library. Beyond merely returning the data from the parsed document, our parser provides a value structure that includes the start and end locations of each parsed table and value. This feature is instrumental in generating informative and useful error messages.
## Key Features
- Compliance with TOML 1.0 and TOML 1.1 specifications
- Dependency-free for maximum compatibility
- Robust and secure
- Compatibility with both Qt5 and Qt6
- User-friendly interface
- Modern, clean C++ code base
- Strict UTF-8 parsing, independent of Qt library
## Getting Started
The *Erbsland Qt TOML* parser is ready to be included as a git submodule in your project and can be linked as a static library. Thanks to its lack of dependencies, it is highly flexible and can be conveniently incorporated into any build system.
Here's a quick peek at how you can use it:
```cpp
#include
using elqt::toml;
void readConfiguration() {
Parser parser{};
try {
auto toml = parser.parseFileOrThrow(QStringLiteral("config.toml"));
// ...
} catch (const Error &error) {
// ...
}
}
```
For a practical illustration, please visit our [Example Project](https://github.com/erbsland-dev/erbsland-qt-toml-example/).
## Documentation
Detailed [documentation](https://erbsland-dev.github.io/erbsland-qt-toml/) can be found here:
👉 [Documentation](https://erbsland-dev.github.io/erbsland-qt-toml/) 👈
## Feedback and Requests
We greatly value your feedback and suggestions. Please use the GitHub issue tracker for bug reports or feature requests:
👉 [Report an Issue](https://github.com/erbsland-dev/erbsland-qt-toml/issues) 👈
## License
Copyright © 2023 Tobias Erbsland https://erbsland.dev/ and EducateIT GmbH https://educateit.ch/
According to the copyright terms specified in the file "COPYRIGHT.md".
SPDX-License-Identifier: LGPL-3.0-or-later
This program is free software: you can redistribute it and/or modify it under the terms of the
GNU Lesser General Public License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program.
If not, see .