PIJSON::toJSON with optionally unicode masking

PIVariantTypes::Color::toName()
This commit is contained in:
2022-12-08 13:21:11 +03:00
parent b609ce8027
commit c4cb81a104
6 changed files with 39 additions and 25 deletions

View File

@@ -169,7 +169,7 @@ public:
//! \~english Returns text representation of JSON tree.
//! \~russian Возвращает текстовое представление дерева JSON.
PIString toJSON(PrintType print_type = Compact) const;
PIString toJSON(PrintType print_type = Compact, bool mask_unicode = true) const;
//! \~english Parse text representation of JSON "str" and returns it root element.
//! \~russian Разбирает текстовое представление JSON "str" и возвращает его корневой элемент.
@@ -185,9 +185,9 @@ private:
static PIJSON parseValue(PIString & s);
static PIJSON parseObject(PIString s);
static PIJSON parseArray(PIString s);
static PIString stringMask(const PIString & s);
static PIString stringMask(const PIString & s, bool mask_unicode);
static PIString stringUnmask(const PIString & s);
static void print(PIString & s, const PIJSON & v, PIString tab, bool spaces, bool transform = false, bool comma = false);
static void print(PIString & s, const PIJSON & v, PIString tab, bool spaces, bool transform = false, bool comma = false, bool mask_unicode = true);
PIString c_name;
PIVariant c_value;