Mercurial > pub > ImplabNet
comparison Implab/JSON/JSONWriter.cs @ 115:ffd3702968c7 v2
fixed JSON writer
author | cin |
---|---|
date | Sun, 21 Dec 2014 13:52:08 +0300 |
parents | d67b95eddaf4 |
children | e046a94eecb1 |
comparison
equal
deleted
inserted
replaced
114:3fbc6eb93eb1 | 115:ffd3702968c7 |
---|---|
195 m_writer.Write(value ? "true" : "false"); | 195 m_writer.Write(value ? "true" : "false"); |
196 } | 196 } |
197 | 197 |
198 | 198 |
199 void Write(string value) { | 199 void Write(string value) { |
200 if (value == null) | 200 if (value == null) { |
201 m_writer.Write("null"); | 201 m_writer.Write("null"); |
202 return; | |
203 } | |
202 | 204 |
203 var chars = value.ToCharArray(); | 205 var chars = value.ToCharArray(); |
204 m_writer.Write('"'); | 206 m_writer.Write('"'); |
205 | 207 |
206 for (int i = 0; i < chars.Length; i++) { | 208 for (int i = 0; i < chars.Length; i++) { |