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