![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Contains JSON and more generally object-string conversion functions. More...


Go to the source code of this file.
Namespaces | |
| namespace | Script |
| Wraps SM APIs for manipulating JS objects. | |
Typedefs | |
| using | VfsPath = Path |
Functions | |
| std::string | Script::ToString (const ScriptRequest &rq, JS::MutableHandleValue obj, bool pretty=false) |
| Convert an object to a UTF-8 encoded string, either with JSON (if pretty == true and there is no JSON error) or with toSource(). More... | |
| bool | Script::ParseJSON (const ScriptRequest &rq, const std::string &string_utf8, JS::MutableHandleValue out) |
| Parse a UTF-8-encoded JSON string. More... | |
| void | Script::ReadJSONFile (const ScriptRequest &rq, const VfsPath &path, JS::MutableHandleValue out) |
| Read a JSON file. More... | |
| std::string | Script::StringifyJSON (const ScriptRequest &rq, JS::MutableHandleValue obj, bool indent=true) |
| Stringify to a JSON string, UTF-8 encoded. More... | |
Contains JSON and more generally object-string conversion functions.