Pyrogenesis  trunk
Namespaces | Typedefs | Functions
JSON.h File Reference

Contains JSON and more generally object-string conversion functions. More...

#include "ScriptForward.h"
#include <string>
Include dependency graph for JSON.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 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...
 

Detailed Description

Contains JSON and more generally object-string conversion functions.

Typedef Documentation

◆ VfsPath

using VfsPath = Path