Add centralized escaping of JSON strings

Enable correct escaping of " character thus removing the need to outlaw "s in comments
This commit is contained in:
Alexander Bock
2017-07-14 16:58:18 -04:00
parent 88b8789336
commit 6f524f4a67
6 changed files with 48 additions and 34 deletions
@@ -100,6 +100,15 @@ private:
const std::string _javascriptFile;
};
/**
* This function takes a \p text and escapes all necessary characters () that JSON
* does not want in its strings.
* \param text The text that is to be escaped
* \return The same text will all required characteres escaped
*/
std::string escapedJson(const std::string& text);
} // namespace openspace
#endif // __OPENSPACE_CORE___DOCUMENTATIONGENERATOR___H__