comparison OrthancServer/ServerContext.cpp @ 696:4c1860179cc5

dictionary of user-defined content types
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Feb 2014 15:00:29 +0100
parents c59bc408fb10
children dd1ce9a2844c
comparison
equal deleted inserted replaced
695:c59bc408fb10 696:4c1860179cc5
114 { 114 {
115 accessor_.SetCompressionForNextOperations(CompressionType_None); 115 accessor_.SetCompressionForNextOperations(CompressionType_None);
116 } 116 }
117 117
118 FileInfo dicomInfo = accessor_.Write(dicomInstance, dicomSize, FileContentType_Dicom); 118 FileInfo dicomInfo = accessor_.Write(dicomInstance, dicomSize, FileContentType_Dicom);
119 FileInfo jsonInfo = accessor_.Write(dicomJson.toStyledString(), FileContentType_Json); 119 FileInfo jsonInfo = accessor_.Write(dicomJson.toStyledString(), FileContentType_JsonSummary);
120 120
121 ServerIndex::Attachments attachments; 121 ServerIndex::Attachments attachments;
122 attachments.push_back(dicomInfo); 122 attachments.push_back(dicomInfo);
123 attachments.push_back(jsonInfo); 123 attachments.push_back(jsonInfo);
124 124
174 174
175 void ServerContext::ReadJson(Json::Value& result, 175 void ServerContext::ReadJson(Json::Value& result,
176 const std::string& instancePublicId) 176 const std::string& instancePublicId)
177 { 177 {
178 std::string s; 178 std::string s;
179 ReadFile(s, instancePublicId, FileContentType_Json); 179 ReadFile(s, instancePublicId, FileContentType_JsonSummary);
180 180
181 Json::Reader reader; 181 Json::Reader reader;
182 if (!reader.parse(s, result)) 182 if (!reader.parse(s, result))
183 { 183 {
184 throw OrthancException("Corrupted JSON file"); 184 throw OrthancException("Corrupted JSON file");