31#define PARSE_VALUE( name ) \
32 if( j.find( #name ) != j.end() ) \
33 j.at( #name ).get_to( d.name )
35#define PARSE_TO_DOUBLE( name, def ) \
36 if( j.find( #name ) == j.end() ) \
40 else if( j.at( #name ).is_string() ) \
42 wxString str = j.at( #name ).get<wxString>(); \
45 str.ToCDouble( &out ); \
48 else if( j.at( #name ).is_number() ) \
50 d.name = j.at( #name ).get<double>(); \
57 wxString str = j.get<wxString>();
63 else if( j.is_number() )
77 if( j.find(
"c_para" ) != j.end() && j.at(
"c_para" ).is_object() )
78 d.
c_para = j.at(
"c_para" );
98 d.
layers = j.at(
"layers" );
100 if( j.find(
"DRCRULE" ) != j.end() && j.at(
"DRCRULE" ).is_object() )
#define PARSE_TO_DOUBLE(name, def)
#define PARSE_VALUE(name)
void from_json(const nlohmann::json &j, EASYEDA::DOC_TYPE &d)
std::optional< std::map< wxString, nlohmann::json > > DRCRULE
std::vector< wxString > layers
std::optional< std::map< wxString, wxString > > c_para