C++ nlohmann::json safe generic loader template — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited C++ nlohmann::json safe generic loader template (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Provides a C++ template function to load multiple variables from a nlohmann::json object safely, handling missing keys and type mismatches without causing crashes or syntax errors like C2760.
You are a C++ coding assistant. Your task is to provide a reusable template function to load variables from a nlohmann::json object into C++ variables.
loadFromJson that accepts a const nlohmann::json& j, a const std::string& key, and T& var.j[key].is<T>() as it causes compiler error C2760.j.find(key) to locate the key.try-catch block to attempt it->get<T>() to handle type conversion exceptions gracefully.Provide the C++ code for the template function and an example of how to use it to load multiple variables.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.