NLOHMANN JSON LIBRARY#

This module is dedicated to implementing the Trustable Software Framework for the Niels Lohmann JSON Library. Initially, it emphasizes ensuring the reliability and correctness of the library’s parsing functionality. The Niels Lohmann JSON Library is recognized for its efficient and straightforward approach to JSON parsing, manipulation, and serialization within modern C++ applications, aiming to provide developers with a flexible and robust tool for managing JSON data structures. The framework seeks to enhance these capabilities, aligning them with rigorous software quality standards to ensure dependable JSON processing across diverse applications.

Overview#

This repository provides the aspired setup for projects using C++ and Bazel as a build system.

Requirements#

JSON-Library
status: valid
security: NO
safety: ASIL_B
status: valid
reqtype: Functional
safety: ASIL_B
security: NO
satisfies: stkh_req__functional_req__base_libraries

The base libraries shall provide a JSON-Library with parsing functionality.

Project Layout#

This module includes the following top-level structure:

  • nlohmann_json/include/: C++ source code for the NLOHMANN JSON library

  • nlohmann_json/tests/: Unit and integration tests

  • docs/: Documentation using docs-as-code

  • .github/workflows/: CI/CD pipelines

Quick Start#

To build the module:

bazel build

To run tests:

git submodule init
git submodule update
bazel test //nlohmann_json/tests/src:all_nlohmann_tests --test_output=all

To update the documentation:

bazel run //docs:incremental
python3 -m http.server --directory _build

To generate LaTeX documentation:

apt-get install texlive texlive-latex-extra texlive-fonts-recommended
sphinx-build -b latex . _build/latex
cd _build/latex
pdflatex nlohmannjsonlibrary.tex