20#ifndef RC_JSON_SCHEMA_H
21#define RC_JSON_SCHEMA_H
61 std::vector<AFFECTED_ITEM>
items;
62 std::optional<COORDINATE>
pos;
70 aJson[
"type"] = aViolation.
type;
72 aJson[
"severity"] = aViolation.
severity;
73 aJson[
"items"] = aViolation.
items;
76 aJson[
"pos"] = *aViolation.
pos;
78 if( !aViolation.
layer.IsEmpty() )
79 aJson[
"layer"] = aViolation.
layer;
83 aJson[
"excluded"] = aViolation.
excluded;
84 aJson[
"comment"] = aViolation.
comment;
90 aJson.at(
"type" ).get_to( aViolation.
type );
91 aJson.at(
"description" ).get_to( aViolation.
description );
92 aJson.at(
"severity" ).get_to( aViolation.
severity );
93 aJson.at(
"items" ).get_to( aViolation.
items );
95 if( aJson.contains(
"pos" ) )
98 aViolation.
pos.reset();
100 if( aJson.contains(
"layer" ) )
101 aJson.at(
"layer" ).get_to( aViolation.
layer );
103 aViolation.
layer.clear();
105 aJson.at(
"excluded" ).get_to( aViolation.
excluded );
106 aJson.at(
"comment" ).get_to( aViolation.
comment );
142 unconnected_items, schematic_parity, coordinate_units,
143 included_severities, ignored_checks )
150 std::vector<VIOLATION> violations;
166 coordinate_units, included_severities, ignored_checks )
Contains the json serialization structs for DRC and ERC reports If you are trying to change the outpu...
void from_json(const nlohmann::json &aJson, VIOLATION &aViolation)
void to_json(nlohmann::json &aJson, const VIOLATION &aViolation)
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(DRC_REPORT, $schema, source, date, kicad_version, violations, unconnected_items, schematic_parity, coordinate_units, included_severities, ignored_checks) struct ERC_SHEET
std::vector< wxString > included_severities
std::vector< VIOLATION > unconnected_items
std::vector< IGNORED_CHECK > ignored_checks
std::vector< VIOLATION > violations
std::vector< VIOLATION > schematic_parity
std::vector< wxString > included_severities
std::vector< ERC_SHEET > sheets
std::vector< IGNORED_CHECK > ignored_checks
wxString coordinate_units
std::optional< COORDINATE > pos
std::vector< AFFECTED_ITEM > items