comparison OrthancServer/OrthancInitialization.cpp @ 2871:6eebc2eb3168

refactoring serialization of RemoteModalityParameters
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Oct 2018 12:51:20 +0200
parents 7133ad478eea
children ae20fccdd867
comparison
equal deleted inserted replaced
2870:716dd24974ef 2871:6eebc2eb3168
597 throw OrthancException(ErrorCode_InexistentItem); 597 throw OrthancException(ErrorCode_InexistentItem);
598 } 598 }
599 599
600 try 600 try
601 { 601 {
602 modality.FromJson(modalities[name]); 602 modality.Unserialize(modalities[name]);
603 } 603 }
604 catch (OrthancException&) 604 catch (OrthancException&)
605 { 605 {
606 LOG(ERROR) << "Syntax error in the definition of DICOM modality \"" << name 606 LOG(ERROR) << "Syntax error in the definition of DICOM modality \"" << name
607 << "\". Please check your configuration file."; 607 << "\". Please check your configuration file.";
915 } 915 }
916 916
917 modalities.removeMember(symbolicName); 917 modalities.removeMember(symbolicName);
918 918
919 Json::Value v; 919 Json::Value v;
920 modality.ToJson(v); 920 modality.Serialize(v, true /* force advanced format */);
921 modalities[symbolicName] = v; 921 modalities[symbolicName] = v;
922 } 922 }
923 923
924 #if ORTHANC_ENABLE_PLUGINS == 1 924 #if ORTHANC_ENABLE_PLUGINS == 1
925 if (context.HasPlugins()) 925 if (context.HasPlugins())