comparison OrthancFramework/Sources/WebServiceParameters.cpp @ 4834:bec432ee1094

download of numpy arrays from the REST API
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 26 Nov 2021 19:03:32 +0100
parents 7053502fbf97
children 43e613a7756b
comparison
equal deleted inserted replaced
4833:970092a67897 4834:bec432ee1094
503 503
504 if (found == userProperties_.end()) 504 if (found == userProperties_.end())
505 { 505 {
506 return defaultValue; 506 return defaultValue;
507 } 507 }
508 else if (found->second == "0" || 508 else
509 found->second == "false") 509 {
510 { 510 bool value;
511 return false; 511 if (SerializationToolbox::ParseBoolean(value, found->second))
512 } 512 {
513 else if (found->second == "1" || 513 return value;
514 found->second == "true") 514 }
515 { 515 else
516 return true; 516 {
517 } 517 throw OrthancException(ErrorCode_BadFileFormat, "Bad value for a Boolean user property in the parameters "
518 else 518 "of a Web service: Property \"" + key + "\" equals: " + found->second);
519 { 519 }
520 throw OrthancException(ErrorCode_BadFileFormat, "Bad value for a Boolean user property in the parameters " 520 }
521 "of a Web service: Property \"" + key + "\" equals: " + found->second);
522 }
523 } 521 }
524 522
525 523
526 bool WebServiceParameters::IsAdvancedFormatNeeded() const 524 bool WebServiceParameters::IsAdvancedFormatNeeded() const
527 { 525 {