All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cmonbaby.http.converter.FastJsonRequestBodyConverter Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package com.cmonbaby.http.converter;

import androidx.annotation.NonNull;

import com.alibaba.fastjson.JSON;

import okhttp3.MediaType;
import okhttp3.RequestBody;
import retrofit2.Converter;

/**
 * 

Author: Simon *

QO: 8950764 *

Email: [email protected] *

WebSize: https://www.cmonbaby.com *

Version: 1.0.0 *

Date: 2020/12/28 *

Description: 请求体 */ final class FastJsonRequestBodyConverter implements Converter { private static final MediaType MEDIA_TYPE = MediaType.parse("application/json; charset=UTF-8"); @Override public RequestBody convert(@NonNull T value) { return RequestBody.create(MEDIA_TYPE, JSON.toJSONBytes(value)); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy