0

看到thrift的protocol有JSON和SimpleJSON两个版本,但是网上找不到他们的区别。

iamzhoug37 1.5k
2016-12-07 提问
3 个回答
0

已采纳

SimpleJSON 是一个 write-only 的实现,输出格式适合脚本语言解析(没研究,有可能不是标准JSON)

public class TSimpleJSONProtocol
extends TProtocol
JSON protocol implementation for thrift. This protocol is write-only and produces a simple output format suitable for parsing by scripting languages. It should not be confused with the full-featured TJSONProtocol.


public class TJSONProtocol
extends TProtocol
JSON protocol implementation for thrift. This is a full-featured protocol supporting write and read. Please see the C++ class header for a detailed description of the protocol's wire format.

0

thrift

我只看到JSON

0

SimpleJSON 是json的精简一部分,没有json那么多功能,大多都用json,这个不用考虑了

撰写答案

推广链接