Lower restrictions when parsing json-files (needed for Schoenau, as there are no special days.)
This commit is contained in:
parent
1c13a705c8
commit
10b018a338
@ -34,8 +34,8 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse JSON to document
|
// Parse JSON to document
|
||||||
Document document;
|
Document document;
|
||||||
document.Parse(json);
|
document.Parse(json);
|
||||||
|
|
||||||
// Return if parse error has been found
|
// Return if parse error has been found
|
||||||
ParseErrorCode err = document.GetParseError();
|
ParseErrorCode err = document.GetParseError();
|
||||||
@ -55,13 +55,13 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
|
|||||||
|
|
||||||
// Validate JSON, check configuration members
|
// Validate JSON, check configuration members
|
||||||
if (!document.HasMember("Currency")
|
if (!document.HasMember("Currency")
|
||||||
|| !document.HasMember("PaymentMethod")
|
|| !document.HasMember("PaymentMethod")
|
||||||
|| !document.HasMember("PaymentOption")
|
|| !document.HasMember("PaymentOption")
|
||||||
|| !document.HasMember("PaymentRate")
|
|| !document.HasMember("PaymentRate")
|
||||||
|| !document.HasMember("Duration")
|
|| !document.HasMember("Duration"))
|
||||||
//|| !document.HasMember("WeekDays")
|
//|| !document.HasMember("WeekDays")
|
||||||
|| !document.HasMember("SpecialDaysWorktime")
|
//|| !document.HasMember("SpecialDaysWorktime")
|
||||||
|| !document.HasMember("SpecialDays"))
|
//|| !document.HasMember("SpecialDays"))
|
||||||
{
|
{
|
||||||
printf("%s", "Error: not a valid configuration JSON\n");
|
printf("%s", "Error: not a valid configuration JSON\n");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user