Java Code Examples for com.alibaba.fastjson.serializer.SerializeWriter#writeTo()
The following examples show how to use
com.alibaba.fastjson.serializer.SerializeWriter#writeTo() .
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 check out the related API usage on the sidebar.
Example 1
Source File: FastJsonObjectOutput.java From dubbo-2.6.5 with Apache License 2.0 | 5 votes |
@Override public void writeObject(Object obj) throws IOException { SerializeWriter out = new SerializeWriter(); JSONSerializer serializer = new JSONSerializer(out); serializer.config(SerializerFeature.WriteEnumUsingToString, true); serializer.write(obj); out.writeTo(writer); out.close(); // for reuse SerializeWriter buf writer.println(); writer.flush(); }
Example 2
Source File: FastJsonObjectOutput.java From JobX with Apache License 2.0 | 5 votes |
public void writeObject(Object obj) throws IOException { SerializeWriter out = new SerializeWriter(); JSONSerializer serializer = new JSONSerializer(out); serializer.config(SerializerFeature.WriteEnumUsingToString, true); serializer.write(obj); out.writeTo(writer); out.close(); // for reuse SerializeWriter buf writer.println(); writer.flush(); }
Example 3
Source File: FastJsonObjectOutput.java From dubbox with Apache License 2.0 | 5 votes |
public void writeObject(Object obj) throws IOException { SerializeWriter out = new SerializeWriter(); JSONSerializer serializer = new JSONSerializer(out); serializer.config(SerializerFeature.WriteEnumUsingToString, true); serializer.write(obj); out.writeTo(writer); writer.println(); writer.flush(); }
Example 4
Source File: FastJsonObjectOutput.java From dubbox-hystrix with Apache License 2.0 | 5 votes |
public void writeObject(Object obj) throws IOException { SerializeWriter out = new SerializeWriter(); JSONSerializer serializer = new JSONSerializer(out); serializer.config(SerializerFeature.WriteEnumUsingToString, true); serializer.write(obj); out.writeTo(writer); writer.println(); writer.flush(); }
Example 5
Source File: FastJsonObjectOutput.java From dubbox with Apache License 2.0 | 5 votes |
public void writeObject(Object obj) throws IOException { SerializeWriter out = new SerializeWriter(); JSONSerializer serializer = new JSONSerializer(out); serializer.config(SerializerFeature.WriteEnumUsingToString, true); serializer.write(obj); out.writeTo(writer); writer.println(); writer.flush(); }
Example 6
Source File: FastJsonObjectOutput.java From dubbox with Apache License 2.0 | 5 votes |
public void writeObject(Object obj) throws IOException { SerializeWriter out = new SerializeWriter(); JSONSerializer serializer = new JSONSerializer(out); serializer.config(SerializerFeature.WriteEnumUsingToString, true); serializer.write(obj); out.writeTo(writer); writer.println(); writer.flush(); }