use of com.squareup.moshi.JsonWriter in project retrofit by square.
the class MoshiRequestBodyConverter method convert.
@Override
public RequestBody convert(T value) throws IOException {
Buffer buffer = new Buffer();
JsonWriter writer = JsonWriter.of(buffer);
adapter.toJson(writer, value);
return RequestBody.create(MEDIA_TYPE, buffer.readByteString());
}
Aggregations