mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 12:39:24 -05:00
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:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user