createJson
fun createJson(from: Json? = null, builder: JsonBuilder4J = defaultJsonBuilder, eventProcessingContext: EventProcessingContext? = null): Json(source)
fun createJson(from: Json? = null, builder: JsonBuilder4J = defaultJsonBuilder, vararg serializersModules: SerializersModule): Json(source)
操作提供的 JsonBuilder 构建一个 kotlinx-serialization-json
中的 Json 对象。
e.g.
MessageSerializationUtil.createJson(Json.Default, builder -> {
builder.setLenient(true);
// or other...
});
Content copied to clipboard