Skip to content

Commit

Permalink
Rename elasticmagic-serde-serialization-json module to elasticmagic-s…
Browse files Browse the repository at this point in the history
…erde-kotlinx-json
  • Loading branch information
anti-social committed Mar 24, 2023
1 parent 7b385cf commit 9e58da2
Show file tree
Hide file tree
Showing 21 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ kotlin {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.4")
implementation(project(":elasticmagic-serde-serialization-json"))
implementation(project(":elasticmagic-serde-kotlinx-json"))
}
}
val jvmMain by getting {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.evo.elasticmagic.serde

import dev.evo.elasticmagic.serde.serialization.JsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde

import kotlinx.benchmark.BenchmarkTimeUnit
import kotlinx.benchmark.OutputTimeUnit
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
// Elasticmagic core api
implementation("dev.evo.elasticmagic:elasticmagic:$elasticmagicVersion")
// Json serialization using kotlinx.serialization
implementation("dev.evo.elasticmagic:elasticmagic-serde-serialization-json:$elasticmagicVersion")
implementation("dev.evo.elasticmagic:elasticmagic-serde-kotlinx-json:$elasticmagicVersion")
// Transport that uses ktor http client
implementation("dev.evo.elasticmagic:elasticmagic-transport-ktor:$elasticmagicVersion")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
public abstract class dev/evo/elasticmagic/serde/serialization/JsonDeserializer : dev/evo/elasticmagic/serde/Deserializer {
public static final field Companion Ldev/evo/elasticmagic/serde/serialization/JsonDeserializer$Companion;
public abstract class dev/evo/elasticmagic/serde/kotlinx/JsonDeserializer : dev/evo/elasticmagic/serde/Deserializer {
public static final field Companion Ldev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$Companion;
public fun objFromString (Ljava/lang/String;)Ldev/evo/elasticmagic/serde/Deserializer$ObjectCtx;
public fun objFromStringOrNull (Ljava/lang/String;)Ldev/evo/elasticmagic/serde/Deserializer$ObjectCtx;
}

public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$ArrayCtx : dev/evo/elasticmagic/serde/Deserializer$ArrayCtx {
public static final synthetic fun box-impl (Lkotlinx/serialization/json/JsonArray;)Ldev/evo/elasticmagic/serde/serialization/JsonDeserializer$ArrayCtx;
public final class dev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ArrayCtx : dev/evo/elasticmagic/serde/Deserializer$ArrayCtx {
public static final synthetic fun box-impl (Lkotlinx/serialization/json/JsonArray;)Ldev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ArrayCtx;
public static fun constructor-impl (Lkotlinx/serialization/json/JsonArray;)Lkotlinx/serialization/json/JsonArray;
public fun equals (Ljava/lang/Object;)Z
public static fun equals-impl (Lkotlinx/serialization/json/JsonArray;Ljava/lang/Object;)Z
Expand All @@ -19,7 +19,7 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$Arr
public final synthetic fun unbox-impl ()Lkotlinx/serialization/json/JsonArray;
}

public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$ArrayIterator : dev/evo/elasticmagic/serde/Deserializer$ArrayIterator {
public final class dev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ArrayIterator : dev/evo/elasticmagic/serde/Deserializer$ArrayIterator {
public fun <init> (Ljava/util/Iterator;)V
public fun any ()Ljava/lang/Object;
public fun anyOrNull ()Ljava/lang/Object;
Expand All @@ -42,10 +42,10 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$Arr
public fun stringOrNull ()Ljava/lang/String;
}

public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$Companion : dev/evo/elasticmagic/serde/serialization/JsonDeserializer {
public final class dev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$Companion : dev/evo/elasticmagic/serde/kotlinx/JsonDeserializer {
}

public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$ObjectCtx : dev/evo/elasticmagic/serde/Deserializer$ObjectCtx {
public final class dev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ObjectCtx : dev/evo/elasticmagic/serde/Deserializer$ObjectCtx {
public fun any (Ljava/lang/String;)Ljava/lang/Object;
public static fun any-impl (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;)Ljava/lang/Object;
public fun anyOrNull (Ljava/lang/String;)Ljava/lang/Object;
Expand All @@ -58,7 +58,7 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$Obj
public static fun boolean-impl (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;)Z
public fun booleanOrNull (Ljava/lang/String;)Ljava/lang/Boolean;
public static fun booleanOrNull-impl (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;)Ljava/lang/Boolean;
public static final synthetic fun box-impl (Lkotlinx/serialization/json/JsonObject;)Ldev/evo/elasticmagic/serde/serialization/JsonDeserializer$ObjectCtx;
public static final synthetic fun box-impl (Lkotlinx/serialization/json/JsonObject;)Ldev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ObjectCtx;
public static fun constructor-impl (Lkotlinx/serialization/json/JsonObject;)Lkotlinx/serialization/json/JsonObject;
public fun double (Ljava/lang/String;)D
public static fun double-impl (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;)D
Expand All @@ -79,8 +79,8 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$Obj
public fun intOrNull (Ljava/lang/String;)Ljava/lang/Integer;
public static fun intOrNull-impl (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;)Ljava/lang/Integer;
public synthetic fun iterator ()Ldev/evo/elasticmagic/serde/Deserializer$ObjectIterator;
public fun iterator ()Ldev/evo/elasticmagic/serde/serialization/JsonDeserializer$ObjectIterator;
public static fun iterator-impl (Lkotlinx/serialization/json/JsonObject;)Ldev/evo/elasticmagic/serde/serialization/JsonDeserializer$ObjectIterator;
public fun iterator ()Ldev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ObjectIterator;
public static fun iterator-impl (Lkotlinx/serialization/json/JsonObject;)Ldev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ObjectIterator;
public fun long (Ljava/lang/String;)J
public static fun long-impl (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;)J
public fun longOrNull (Ljava/lang/String;)Ljava/lang/Long;
Expand All @@ -98,7 +98,7 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$Obj
public final synthetic fun unbox-impl ()Lkotlinx/serialization/json/JsonObject;
}

public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$ObjectIterator : dev/evo/elasticmagic/serde/Deserializer$ObjectIterator {
public final class dev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$ObjectIterator : dev/evo/elasticmagic/serde/Deserializer$ObjectIterator {
public fun <init> (Ljava/util/Iterator;)V
public fun any ()Ljava/lang/Object;
public fun anyOrNull ()Ljava/lang/Object;
Expand All @@ -122,23 +122,23 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonDeserializer$Obj
public fun stringOrNull ()Ljava/lang/String;
}

public final class dev/evo/elasticmagic/serde/serialization/JsonSerde : dev/evo/elasticmagic/serde/Serde$OneLineJson {
public static final field INSTANCE Ldev/evo/elasticmagic/serde/serialization/JsonSerde;
public final class dev/evo/elasticmagic/serde/kotlinx/JsonSerde : dev/evo/elasticmagic/serde/Serde$OneLineJson {
public static final field INSTANCE Ldev/evo/elasticmagic/serde/kotlinx/JsonSerde;
public synthetic fun getDeserializer ()Ldev/evo/elasticmagic/serde/Deserializer;
public fun getDeserializer ()Ldev/evo/elasticmagic/serde/serialization/JsonDeserializer$Companion;
public fun getDeserializer ()Ldev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$Companion;
public synthetic fun getSerializer ()Ldev/evo/elasticmagic/serde/Serializer;
public fun getSerializer ()Ldev/evo/elasticmagic/serde/serialization/JsonSerializer$Companion;
public fun getSerializer ()Ldev/evo/elasticmagic/serde/kotlinx/JsonSerializer$Companion;
}

public abstract class dev/evo/elasticmagic/serde/serialization/JsonSerializer : dev/evo/elasticmagic/serde/Serializer {
public static final field Companion Ldev/evo/elasticmagic/serde/serialization/JsonSerializer$Companion;
public abstract class dev/evo/elasticmagic/serde/kotlinx/JsonSerializer : dev/evo/elasticmagic/serde/Serializer {
public static final field Companion Ldev/evo/elasticmagic/serde/kotlinx/JsonSerializer$Companion;
public fun array (Lkotlin/jvm/functions/Function1;)Ldev/evo/elasticmagic/serde/Serializer$ArrayCtx;
protected fun getJson ()Lkotlinx/serialization/json/Json;
public fun obj (Lkotlin/jvm/functions/Function1;)Ldev/evo/elasticmagic/serde/Serializer$ObjectCtx;
}

public final class dev/evo/elasticmagic/serde/serialization/JsonSerializer$ArrayCtx : dev/evo/elasticmagic/serde/Serializer$ArrayCtx {
public fun <init> (Ldev/evo/elasticmagic/serde/serialization/JsonSerializer;)V
public final class dev/evo/elasticmagic/serde/kotlinx/JsonSerializer$ArrayCtx : dev/evo/elasticmagic/serde/Serializer$ArrayCtx {
public fun <init> (Ldev/evo/elasticmagic/serde/kotlinx/JsonSerializer;)V
public fun array (Lkotlin/jvm/functions/Function1;)V
public final fun build ()Lkotlinx/serialization/json/JsonArray;
public fun obj (Lkotlin/jvm/functions/Function1;)V
Expand All @@ -159,11 +159,11 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonSerializer$Array
public fun valueIfNotNull (Ljava/lang/String;)V
}

public final class dev/evo/elasticmagic/serde/serialization/JsonSerializer$Companion : dev/evo/elasticmagic/serde/serialization/JsonSerializer {
public final class dev/evo/elasticmagic/serde/kotlinx/JsonSerializer$Companion : dev/evo/elasticmagic/serde/kotlinx/JsonSerializer {
}

public final class dev/evo/elasticmagic/serde/serialization/JsonSerializer$ObjectCtx : dev/evo/elasticmagic/serde/Serializer$ObjectCtx {
public fun <init> (Ldev/evo/elasticmagic/serde/serialization/JsonSerializer;)V
public final class dev/evo/elasticmagic/serde/kotlinx/JsonSerializer$ObjectCtx : dev/evo/elasticmagic/serde/Serializer$ObjectCtx {
public fun <init> (Ldev/evo/elasticmagic/serde/kotlinx/JsonSerializer;)V
public fun array (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public final fun build ()Lkotlinx/serialization/json/JsonObject;
public fun field (Ljava/lang/String;Ljava/lang/Boolean;)V
Expand All @@ -184,15 +184,15 @@ public final class dev/evo/elasticmagic/serde/serialization/JsonSerializer$Objec
public fun serialize ()Ljava/lang/String;
}

public final class dev/evo/elasticmagic/serde/serialization/PrettyJsonSerde : dev/evo/elasticmagic/serde/Serde$Json {
public static final field INSTANCE Ldev/evo/elasticmagic/serde/serialization/PrettyJsonSerde;
public final class dev/evo/elasticmagic/serde/kotlinx/PrettyJsonSerde : dev/evo/elasticmagic/serde/Serde$Json {
public static final field INSTANCE Ldev/evo/elasticmagic/serde/kotlinx/PrettyJsonSerde;
public synthetic fun getDeserializer ()Ldev/evo/elasticmagic/serde/Deserializer;
public fun getDeserializer ()Ldev/evo/elasticmagic/serde/serialization/JsonDeserializer$Companion;
public fun getDeserializer ()Ldev/evo/elasticmagic/serde/kotlinx/JsonDeserializer$Companion;
public synthetic fun getSerializer ()Ldev/evo/elasticmagic/serde/Serializer;
public fun getSerializer ()Ldev/evo/elasticmagic/serde/serialization/PrettyJsonSerializer;
public fun getSerializer ()Ldev/evo/elasticmagic/serde/kotlinx/PrettyJsonSerializer;
}

public final class dev/evo/elasticmagic/serde/serialization/PrettyJsonSerializer : dev/evo/elasticmagic/serde/serialization/JsonSerializer {
public static final field INSTANCE Ldev/evo/elasticmagic/serde/serialization/PrettyJsonSerializer;
public final class dev/evo/elasticmagic/serde/kotlinx/PrettyJsonSerializer : dev/evo/elasticmagic/serde/kotlinx/JsonSerializer {
public static final field INSTANCE Ldev/evo/elasticmagic/serde/kotlinx/PrettyJsonSerializer;
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.evo.elasticmagic.serde.serialization
package dev.evo.elasticmagic.serde.kotlinx

import dev.evo.elasticmagic.serde.DeserializationException
import dev.evo.elasticmagic.serde.Deserializer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.evo.elasticmagic.serde.serialization
package dev.evo.elasticmagic.serde.kotlinx

import dev.evo.elasticmagic.serde.Serde

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.evo.elasticmagic.serde.serialization
package dev.evo.elasticmagic.serde.kotlinx

import dev.evo.elasticmagic.serde.Serializer
import kotlinx.serialization.json.Json
Expand Down
2 changes: 1 addition & 1 deletion elasticmagic-transport-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ kotlin {
val commonTest by getting {
dependencies {
implementation(Libs.ktorClient("mock"))
implementation(project(":elasticmagic-serde-serialization-json"))
implementation(project(":elasticmagic-serde-kotlinx-json"))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.evo.elasticmagic.transport

import dev.evo.elasticmagic.serde.serialization.JsonDeserializer
import dev.evo.elasticmagic.serde.serialization.JsonSerde
import dev.evo.elasticmagic.serde.serialization.JsonSerializer
import dev.evo.elasticmagic.serde.kotlinx.JsonDeserializer
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerializer
import dev.evo.elasticmagic.serde.toMap

import io.kotest.assertions.throwables.shouldThrow
Expand Down
2 changes: 1 addition & 1 deletion elasticmagic-transport/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kotlin {

getByName("commonTest") {
dependencies {
api(project(":elasticmagic-serde-serialization-json"))
api(project(":elasticmagic-serde-kotlinx-json"))
api(Libs.kotlinxSerialization("json"))
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.evo.elasticmagic.transport

import dev.evo.elasticmagic.serde.serialization.JsonDeserializer
import dev.evo.elasticmagic.serde.kotlinx.JsonDeserializer

import io.kotest.matchers.shouldBe
import io.kotest.matchers.types.shouldBeInstanceOf
Expand Down
2 changes: 1 addition & 1 deletion integ-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ kotlin {
dependencies {
implementation(project(":elasticmagic"))

implementation(project(":elasticmagic-serde-serialization-json"))
implementation(project(":elasticmagic-serde-kotlinx-json"))

implementation(project(":elasticmagic-transport-ktor"))
implementation(Libs.ktorClient("core"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.evo.elasticmagic

import dev.evo.elasticmagic.serde.serialization.JsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde
import dev.evo.elasticmagic.transport.CatRequest
import dev.evo.elasticmagic.transport.ElasticsearchException
import dev.evo.elasticmagic.transport.ElasticsearchKtorTransport
Expand Down
4 changes: 2 additions & 2 deletions integ-tests/src/jsTest/kotlin/dev/evo/elasticmagic/serde.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.evo.elasticmagic

import dev.evo.elasticmagic.serde.Serde
import dev.evo.elasticmagic.serde.serialization.JsonSerde as SerializationJsonSerde
import dev.evo.elasticmagic.serde.serialization.PrettyJsonSerde as SerializationPrettyJsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde as SerializationJsonSerde
import dev.evo.elasticmagic.serde.kotlinx.PrettyJsonSerde as SerializationPrettyJsonSerde

actual val apiSerdes: List<Serde> = listOf(
SerializationJsonSerde,
Expand Down
4 changes: 2 additions & 2 deletions integ-tests/src/jvmTest/kotlin/dev/evo/elasticmagic/serde.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import dev.evo.elasticmagic.serde.Serde
import dev.evo.elasticmagic.serde.jackson.JsonSerde as JacksonJsonSerde
import dev.evo.elasticmagic.serde.jackson.JsonSerde as JacksonPrettyJsonSerde
import dev.evo.elasticmagic.serde.jackson.YamlSerde as JacksonYamlSerde
import dev.evo.elasticmagic.serde.serialization.JsonSerde as SerializationJsonSerde
import dev.evo.elasticmagic.serde.serialization.PrettyJsonSerde as SerializationPrettyJsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde as SerializationJsonSerde
import dev.evo.elasticmagic.serde.kotlinx.PrettyJsonSerde as SerializationPrettyJsonSerde

actual val apiSerdes = listOf(
SerializationJsonSerde,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.evo.elasticmagic

import dev.evo.elasticmagic.serde.Serde
import dev.evo.elasticmagic.serde.serialization.JsonSerde as SerializationJsonSerde
import dev.evo.elasticmagic.serde.serialization.PrettyJsonSerde as SerializationPrettyJsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde as SerializationJsonSerde
import dev.evo.elasticmagic.serde.kotlinx.PrettyJsonSerde as SerializationPrettyJsonSerde

actual val apiSerdes: List<Serde> = listOf(
SerializationJsonSerde,
Expand Down
2 changes: 1 addition & 1 deletion samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ configure<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension> {
dependencies {
implementation(project(":elasticmagic"))
implementation(project(":elasticmagic-query-filters"))
implementation(project(":elasticmagic-serde-serialization-json"))
implementation(project(":elasticmagic-serde-kotlinx-json"))
implementation(project(":elasticmagic-transport-ktor"))

implementation(Libs.kotlinxCoroutines("core"))
Expand Down
2 changes: 1 addition & 1 deletion samples/src/commonMain/kotlin/samples/started/Cluster.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package samples.started

import dev.evo.elasticmagic.ElasticsearchCluster
import dev.evo.elasticmagic.serde.serialization.JsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde
import dev.evo.elasticmagic.transport.ElasticsearchKtorTransport

const val DEFAULT_ELASTIC_URL = "http://localhost:9200"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package samples.started

import dev.evo.elasticmagic.serde.serialization.JsonSerde
import dev.evo.elasticmagic.serde.kotlinx.JsonSerde
import dev.evo.elasticmagic.transport.Auth
import dev.evo.elasticmagic.transport.ElasticsearchKtorTransport

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include(
"elasticmagic-serde",
"elasticmagic-serde-jackson-json",
"elasticmagic-serde-jackson-yaml",
"elasticmagic-serde-serialization-json",
"elasticmagic-serde-kotlinx-json",
"elasticmagic-transport",
"elasticmagic-transport-ktor",
"integ-tests",
Expand Down

0 comments on commit 9e58da2

Please sign in to comment.