MCPcopy Create free account
hub / github.com/apache/thrift / writeJSONString

Method writeJSONString

lib/php/lib/Protocol/TJSONProtocol.php:205–218  ·  view source on GitHub ↗
($b)

Source from the content-addressed store, hash-verified

203 }
204
205 private function writeJSONString($b)
206 {
207 $this->context_->write();
208
209 if (is_numeric($b) && $this->context_->escapeNum()) {
210 $this->trans_->write(self::QUOTE);
211 }
212
213 $this->trans_->write(json_encode($b, JSON_UNESCAPED_UNICODE));
214
215 if (is_numeric($b) && $this->context_->escapeNum()) {
216 $this->trans_->write(self::QUOTE);
217 }
218 }
219
220 private function writeJSONInteger($num)
221 {

Callers 15

writeMessageBeginMethod · 0.95
writeFieldBeginMethod · 0.95
writeMapBeginMethod · 0.95
writeListBeginMethod · 0.95
writeSetBeginMethod · 0.95
writeStringMethod · 0.95
writeUuidMethod · 0.95
writeMessageBeginMethod · 0.95
writeFieldBeginMethod · 0.95
writeMapBeginMethod · 0.95
writeListBeginMethod · 0.95

Calls 2

writeMethod · 0.65
escapeNumMethod · 0.45

Tested by 1