Java Code Examples for

The following examples show how to use . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
public byte[] encodeResponseData(Object data,RpcMethod rpcMethod) {
    if(data == null){
        return EMPTY;

    try (SerializeWriter out = new SerializeWriter(null, JSON.DEFAULT_GENERATE_FEATURE,
        JSONSerializer serializer = new JSONSerializer(out, SerializeConfig.globalInstance);
        return out.toBytes(CHARSET_UTF8);
Example 2
private TencentImPlugin(Context context, MethodChannel channel) {
    TencentImPlugin.context = context; = channel;
    JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.DisableCircularReferenceDetect.mask;
Example 3
Source Project: uavstack   File:    License: Apache License 2.0 4 votes vote down vote up
public SerializeWriter(Writer writer){
    this(writer, JSON.DEFAULT_GENERATE_FEATURE, SerializerFeature.EMPTY);