Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
Json.cpp File Reference
#include <sese/config/Json.h>
#include <cassert>

Macros

#define CONST_WRITE(stream, const_string)
 
#define STRING_WRITE(stream, string)
 

Functions

bool isKeyword (const char *str)
 

Macro Definition Documentation

◆ CONST_WRITE

#define CONST_WRITE ( stream,
const_string )
Value:
if (stream->write(const_string, strlen(const_string)) != strlen(const_string)) \
return false

Referenced by sese::Json::streamifyArray(), sese::Yaml::streamifyArray(), sese::Json::streamifyBasic(), sese::Yaml::streamifyBasic(), sese::Json::streamifyObject(), and sese::Yaml::streamifyObject().

◆ STRING_WRITE

#define STRING_WRITE ( stream,
string )
Value:
if (stream->write(string.data(), string.size()) != string.size()) \
return false

Referenced by sese::Json::streamifyBasic(), sese::Yaml::streamifyBasic(), sese::Json::streamifyObject(), and sese::Yaml::streamifyObject().

Function Documentation

◆ isKeyword()

bool isKeyword ( const char * str)
inline

Checks if a token is a JSON keyword

Parameters
strThe token
Returns
The result

Referenced by sese::Json::parseArray(), sese::Json::parseObject(), and sese::Json::tokenizer().