| 98 | |
| 99 | public: |
| 100 | TPrettifier(IOutputStream& out, const TJsonPrettifier& p) |
| 101 | : Out(out) |
| 102 | , MaxPaddingLevel(p.MaxPaddingLevel) |
| 103 | , Unquote(p.Unquote) |
| 104 | , Compactify(p.Compactify) |
| 105 | , NewUnquote(p.NewUnquote) |
| 106 | { |
| 107 | static TSpaces spaces; |
| 108 | Spaces = spaces.Get(p.Padding); |
| 109 | if (p.SingleQuotes) { |
| 110 | Quote = Unsafe = "'"; |
| 111 | Safe = "\""; |
| 112 | } else { |
| 113 | Quote = Unsafe = "\""; |
| 114 | Safe = "'"; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | void Pad(bool close = false) { |
| 119 | if (Compactify) { |