MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / formatJSON

Function formatJSON

samples/exifdata.cpp:99–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99std::string formatJSON(Exiv2::ExifData& exifData) {
100 size_t count = 0;
101 size_t length = formatInit(exifData);
102 std::ostringstream result;
103
104 result << "{" << std::endl;
105 for (auto i = exifData.begin(); count++ < length; ++i) {
106 result << " " << escapeJSON(i, false) << ":" << escapeJSON(i, true) << (count != length ? "," : "") << std::endl;
107 }
108 result << "}";
109 return result.str();
110}
111
112///////////////////////////////////////////////////////////////////////
113std::string escapeXML(Exiv2::ExifData::const_iterator it, bool bValue = true) {

Callers 1

mainFunction · 0.85

Calls 3

formatInitFunction · 0.85
escapeJSONFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected