导航菜单

页面标题

页面副标题

Kreate v1.5.0 - JsonSerializer.java 源代码

正在查看: Kreate v1.5.0 应用的 JsonSerializer.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package io.ktor.client.plugins.json;

import io.ktor.http.ContentType;
import io.ktor.http.LinkHeader;
import io.ktor.http.content.OutgoingContent;
import io.ktor.util.reflect.TypeInfo;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.io.Source;

@Deprecated(level = DeprecationLevel.ERROR, message = "Please use ContentNegotiation plugin and its converters: https://ktor.io/docs/migration-to-20x.html#serialization-client")
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\bg\u0018\u00002\u00020\u0001J\u001f\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0004\u001a\u00020\u0003H&¢\u0006\u0004\b\u0006\u0010\u0007J\u0017\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0002\u001a\u00020\u0001H\u0016¢\u0006\u0004\b\u0006\u0010\bJ#\u0010\u000e\u001a\u00020\u00012\u0006\u0010\n\u001a\u00020\t2\n\u0010\r\u001a\u00060\u000bj\u0002`\fH&¢\u0006\u0004\b\u000e\u0010\u000f¨\u0006\u0010"}, d2 = {"Lio/ktor/client/plugins/json/JsonSerializer;", "", "data", "Lio/ktor/http/ContentType;", "contentType", "Lio/ktor/http/content/OutgoingContent;", "write", "(Ljava/lang/Object;Lio/ktor/http/ContentType;)Lio/ktor/http/content/OutgoingContent;", "(Ljava/lang/Object;)Lio/ktor/http/content/OutgoingContent;", "Lio/ktor/util/reflect/TypeInfo;", LinkHeader.Parameters.Type, "Lkotlinx/io/Source;", "Lio/ktor/utils/io/core/Input;", "body", "read", "(Lio/ktor/util/reflect/TypeInfo;Lkotlinx/io/Source;)Ljava/lang/Object;", "ktor-client-json"}, k = 1, mv = {2, 1, 0}, xi = 48)
public interface JsonSerializer {
    Object read(TypeInfo type, Source body);

    OutgoingContent write(Object data);

    OutgoingContent write(Object data, ContentType contentType);

    @Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
    public static final class DefaultImpls {
        public static OutgoingContent write(JsonSerializer jsonSerializer, Object data) {
            Intrinsics.checkNotNullParameter(data, "data");
            return jsonSerializer.write(data, ContentType.Application.INSTANCE.getJson());
        }
    }
}