10#ifndef WX_JSONWRITER_H
11#define WX_JSONWRITER_H
27 wxJSONWRITER_NONE = 0,
28 wxJSONWRITER_STYLED = 1,
29 wxJSONWRITER_WRITE_COMMENTS = 2,
30 wxJSONWRITER_COMMENTS_BEFORE = 4,
31 wxJSONWRITER_COMMENTS_AFTER = 8,
32 wxJSONWRITER_SPLIT_STRING = 16,
33 wxJSONWRITER_NO_LINEFEEDS = 32,
34 wxJSONWRITER_ESCAPE_SOLIDUS = 64,
35 wxJSONWRITER_MULTILINE_STRING = 128,
36 wxJSONWRITER_RECOGNIZE_UNSIGNED = 256,
37 wxJSONWRITER_TAB_INDENT = 512,
38 wxJSONWRITER_NO_INDENTATION = 1024,
39 wxJSONWRITER_NOUTF8_STREAM = 2048,
40 wxJSONWRITER_MEMORYBUFF = 4096
47 wxJSONWriter(
int style = wxJSONWRITER_STYLED,
int indent = 0,
int step = 3);
62 int WriteString(wxOutputStream& os,
const wxString& str);
74 int WriteKey(wxOutputStream& os,
const wxString& key);
77 int WriteError(
const wxString& err);
The JSON value class implementation.
int WriteComment(wxOutputStream &os, const wxJSONValue &value, bool indent)
Write the comment strings, if any.
int WriteInvalid(wxOutputStream &os)
Write the invalid JSON value to the output stream.
int WriteUIntValue(wxOutputStream &os, const wxJSONValue &v)
Writes a value of type UNSIGNED INT.
bool IsPunctuation(wxChar ch)
Returns TRUE if the character if a puctuation character.
void Write(const wxJSONValue &value, wxString &str)
Write the JSONvalue object to a JSON text.
void SetDoubleFmtString(const char *fmt)
Set the format string for double values.
int WriteIntValue(wxOutputStream &os, const wxJSONValue &v)
Writes a value of type INT.
int WriteKey(wxOutputStream &os, const wxString &key)
Write the key of a key/value element to the output stream.
int WriteIndent(wxOutputStream &os)
Writes the indentation to the JSON text.
int WriteBoolValue(wxOutputStream &os, const wxJSONValue &v)
Writes a value of type BOOL.
bool IsSpace(wxChar ch)
Returns TRUE if the character is a space character.
int WriteNullValue(wxOutputStream &os)
Write the nullptr JSON value to the output stream.
int WriteStringValue(wxOutputStream &os, const wxString &str)
Write the provided string to the output object.
int WriteString(wxOutputStream &os, const wxString &str)
Write a generic string.
int WriteMemoryBuff(wxOutputStream &os, const wxMemoryBuffer &buff)
Write a JSON value of type memory buffer.
wxJSONWriter(int style=wxJSONWRITER_STYLED, int indent=0, int step=3)
Ctor.
int WriteDoubleValue(wxOutputStream &os, const wxJSONValue &v)
Writes a value of type DOUBLE.
int DoWrite(wxOutputStream &os, const wxJSONValue &value, const wxString *key, bool comma)
Perform the real write operation.
int WriteSeparator(wxOutputStream &os)
Writes the separator between values.
JSON Configuration System Definitions.