Skip to content

Commit

Permalink
Setting version to 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
makiftutuncu committed Jul 19, 2022
1 parent 6afef19 commit 94a18b0
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 71 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It consists of different modules for different needs. You can find details, inst

| Latest Version of e | Java Version | Scala Versions | Kotlin Version |
| ------------------- | --------------------- | ----------------------- | ---------------- |
| 2.0.1 | 1.8 | 2.12.15, 2.13.8 | 1.5.10 |
| 2.0.2 | 1.8 | 2.12.16, 2.13.8 | 1.6.21 |

## Table of Contents

Expand All @@ -27,13 +27,13 @@ It consists of different modules for different needs. You can find details, inst

| Name | Platform | Details | Documentation |
| ------------------------------------ | -------- | ------------------------------------------------------------------ | ------------- |
| [e-scala](e-scala/README.md) | Scala | Scala implementation | [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-scala_2.13) |
| [e-kotlin](e-kotlin/README.md) | Kotlin | Kotlin implementation | [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=kotlin&color=0095d5&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-kotlin) |
| [e-java](e-java/README.md) | Java | Java implementation | [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-java) |
| [e-circe](e-circe/README.md) | Scala | Extras for [circe](https://circe.github.io/circe) | [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-circe_2.13) |
| [e-play-json](e-play-json/README.md) | Scala | Extras for [play-json](https://github.com/playframework/play-json) | [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-play-json_2.13) |
| [e-zio](e-zio/README.md) | Scala | Extras for [ZIO](https://zio.dev) | [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-zio_2.13) |
| [e-gson](e-gson/README.md) | Java | Extras for [gson](https://github.com/google/gson) | [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-gson) |
| [e-scala](e-scala/README.md) | Scala | Scala implementation | [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-scala_2.13) |
| [e-kotlin](e-kotlin/README.md) | Kotlin | Kotlin implementation | [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=kotlin&color=0095d5&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-kotlin) |
| [e-java](e-java/README.md) | Java | Java implementation | [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-java) |
| [e-circe](e-circe/README.md) | Scala | Extras for [circe](https://circe.github.io/circe) | [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-circe_2.13) |
| [e-play-json](e-play-json/README.md) | Scala | Extras for [play-json](https://github.com/playframework/play-json) | [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-play-json_2.13) |
| [e-zio](e-zio/README.md) | Scala | Extras for [ZIO](https://zio.dev) | [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-zio_2.13) |
| [e-gson](e-gson/README.md) | Java | Extras for [gson](https://github.com/google/gson) | [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-gson) |

## Examples and Use Cases

Expand Down
26 changes: 13 additions & 13 deletions e-circe/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[//]: # "This file is generated by [mdoc](https://scalameta.org/mdoc). Do not edit it directly as it will be overwritten. Instead edit corresponding file in docs folder."

# e-circe [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-circe_2.13)
# e-circe [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-circe_2.13)

This is a Json codec implementation for `E` and `EOr` types based on [circe](https://circe.github.io/circe). It provides circe's `Decoder`s and `Encoder`s as well as e's own `Codec` (see [e-scala](/e-scala/README.md#3-codec-decoder-and-encoder) docs).

Expand All @@ -9,7 +9,7 @@ This is a Json codec implementation for `E` and `EOr` types based on [circe](htt
If you use SBT, add following to your `build.sbt`:

```scala
libraryDependencies += "dev.akif" %% "e-circe" % "2.0.1"
libraryDependencies += "dev.akif" %% "e-circe" % "2.0.2"
```
If you use Maven, add following to your `pom.xml` (replace 2.13 if you need a different Scala version):

Expand All @@ -18,15 +18,15 @@ If you use Maven, add following to your `pom.xml` (replace 2.13 if you need a di
<dependency>
<groupId>dev.akif</groupId>
<artifactId>e-circe_2.13</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
</dependencies>
```
If you use Gradle, add following to your project's `build.gradle` (replace 2.13 if you need a different Scala version):

```javascript
dependencies {
implementation('dev.akif:e-circe_2.13:2.0.1')
implementation('dev.akif:e-circe_2.13:2.0.2')
}
```

Expand All @@ -52,21 +52,21 @@ import io.circe.{Decoder => CirceDecoder, Encoder => CirceEncoder, Json}
import io.circe.syntax._

decode[String](123.asJson)
// res1: e.scala.EOr[String] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"message":"String"}]}
// res1: e.scala.EOr[String] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"message":"Got value '123' with wrong type, expecting string"}]}

decode[String]("test".asJson)
// res2: e.scala.EOr[String] = test

case class Foo(bar: Boolean)

implicit val fooDecoder: CirceDecoder[Foo] = CirceDecoder.forProduct1("bar")(Foo.apply)
// fooDecoder: io.circe.Decoder[Foo] = io.circe.ProductDecoders$$anon$1@76e6ae51
// fooDecoder: io.circe.Decoder[Foo] = io.circe.ProductDecoders$$anon$1@4812c0e9

implicit val fooEncoder: CirceEncoder[Foo] = CirceEncoder.forProduct1("bar")(_.bar)
// fooEncoder: io.circe.Encoder[Foo] = io.circe.ProductEncoders$$anon$1@78b3f1c7
// fooEncoder: io.circe.Encoder[Foo] = io.circe.ProductEncoders$$anon$1@6651e0f

decode[Foo](Json.obj())
// res3: e.scala.EOr[Foo] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"name":".bar","message":"Attempt to decode value on failed cursor"}]}
// res3: e.scala.EOr[Foo] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"name":".bar","message":"Missing required field"}]}

decode[Foo](Foo(false).asJson)
// res4: e.scala.EOr[Foo] = Foo(false)
Expand All @@ -91,7 +91,7 @@ decode[E](Json.arr())
// res7: e.scala.EOr[E] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"message":"Expected: JsonObject"}]}

val decoder = makeDecoder[E]
// decoder: e.scala.codec.Decoder[Json, E] = e.scala.codec.CodecFor$$Lambda$13211/0x0000000803530000@497f8c1c
// decoder: e.scala.codec.Decoder[Json, E] = e.scala.codec.CodecFor$$Lambda$13621/0x0000000803544890@30eba2dd

decoder.decode(Json.obj("code" := 1, "name" := "test"))
// res8: e.scala.EOr[E] = {"code":1,"name":"test"}
Expand Down Expand Up @@ -124,7 +124,7 @@ encode(E.name("test").message("Test").cause(E.code(1)))
// }

val encoder = makeEncoder[E]
// encoder: e.scala.codec.Encoder[E, io.circe.Json] = e.scala.codec.CodecFor$$Lambda$13216/0x0000000803536000@753488bc
// encoder: e.scala.codec.Encoder[E, io.circe.Json] = e.scala.codec.CodecFor$$Lambda$13626/0x0000000803547dd0@42f13d3e

encoder.encode(E.code(2))
// res12: io.circe.Json = {
Expand All @@ -147,7 +147,7 @@ encode[EOr[Int]](123.toEOr)
// res15: io.circe.Json = 123

val encoder = makeEncoder[EOr[String]]
// encoder: codec.Encoder[EOr[String], io.circe.Json] = e.scala.codec.CodecFor$$Lambda$13216/0x0000000803536000@26e04468
// encoder: codec.Encoder[EOr[String], io.circe.Json] = e.scala.codec.CodecFor$$Lambda$13626/0x0000000803547dd0@99ac7eb

encoder.encode(E.name("test").toEOr[String])
// res16: io.circe.Json = {
Expand Down Expand Up @@ -177,10 +177,10 @@ object User {
}

val codec = makeCodec[User]
// codec: e.scala.codec.Codec[User, Json] = e.scala.codec.CodecFor$$anon$1@1a5c353
// codec: e.scala.codec.Codec[User, Json] = e.scala.codec.CodecFor$$anon$1@2b6f2b05

codec.decode(Json.obj("foo" := "bar"))
// res19: EOr[User] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"name":".n","message":"Attempt to decode value on failed cursor"},{"name":".a","message":"Attempt to decode value on failed cursor"}]}
// res19: EOr[User] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"name":".n","message":"Missing required field"},{"name":".a","message":"Missing required field"}]}

codec.decode(Json.obj("n" := "Akif", "a" := 29))
// res20: EOr[User] = User(Akif,29)
Expand Down
8 changes: 4 additions & 4 deletions e-gson/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[//]: # "This file is generated by [mdoc](https://scalameta.org/mdoc). Do not edit it directly as it will be overwritten. Instead edit corresponding file in docs folder."

# e-gson[![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-gson)
# e-gson[![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-gson)

This is a Json codec implementation for `E` and `EOr` types based on [gson](https://github.com/google/gson). It provides gson's `JsonDeserializer`s and `JsonSerializer`s as well as e's own `Codec` (see [e-java](/e-java/README.md#3-codec-decoder-and-encoder) docs).

Expand All @@ -10,7 +10,7 @@ If you use Gradle, add following to your project's `build.gradle`:

```javascript
dependencies {
implementation('dev.akif:e-gson:2.0.1')
implementation('dev.akif:e-gson:2.0.2')
}
```
If you use Maven, add following to your `pom.xml`:
Expand All @@ -20,14 +20,14 @@ If you use Maven, add following to your `pom.xml`:
<dependency>
<groupId>dev.akif</groupId>
<artifactId>e-gson</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
</dependencies>
```
If you use SBT, add following to your `build.sbt`:

```scala
libraryDependencies += "dev.akif" % "e-gson" % "2.0.1"
libraryDependencies += "dev.akif" % "e-gson" % "2.0.2"
```

## Contents
Expand Down
8 changes: 4 additions & 4 deletions e-java/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[//]: # "This file is generated by [mdoc](https://scalameta.org/mdoc). Do not edit it directly as it will be overwritten. Instead edit corresponding file in docs folder."

# e-java [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-java)
# e-java [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=java&color=007396&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-java)

This is the main implementation of e in Java. It contains two main types [E](src/main/java/e/java/E.java) and [EOr](src/main/java/e/java/EOr.java). It also contains definitions of decoding and encoding for these. Implementations of decoding and encoding are provided in separate modules.

Expand All @@ -10,7 +10,7 @@ If you use Gradle, add following to your project's `build.gradle`:

```javascript
dependencies {
implementation('dev.akif:e-java:2.0.1')
implementation('dev.akif:e-java:2.0.2')
}
```
If you use Maven, add following to your `pom.xml`:
Expand All @@ -20,14 +20,14 @@ If you use Maven, add following to your `pom.xml`:
<dependency>
<groupId>dev.akif</groupId>
<artifactId>e-java</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
</dependencies>
```
If you use SBT, add following to your `build.sbt`:

```java
libraryDependencies += "dev.akif" % "e-java" % "2.0.1"
libraryDependencies += "dev.akif" % "e-java" % "2.0.2"
```

## Contents
Expand Down
8 changes: 4 additions & 4 deletions e-kotlin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[//]: # "This file is generated by [mdoc](https://scalameta.org/mdoc). Do not edit it directly as it will be overwritten. Instead edit corresponding file in docs folder."

# e-kotlin [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=kotlin&color=0095d5&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-kotlin)
# e-kotlin [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=kotlin&color=0095d5&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-kotlin)

This is the main implementation of e in Kotlin. It contains two main types [E](src/main/kotlin/e/kotlin/E.kt) and [EOr](src/main/kotlin/e/kotlin/EOr.kt). It also contains definitions of decoding and encoding for these. Implementations of decoding and encoding are provided in separate modules.

Expand All @@ -10,7 +10,7 @@ If you use Gradle, add following to your project's `build.gradle`:

```javascript
dependencies {
implementation('dev.akif:e-kotlin:2.0.1')
implementation('dev.akif:e-kotlin:2.0.2')
}
```
If you use Maven, add following to your `pom.xml`:
Expand All @@ -20,14 +20,14 @@ If you use Maven, add following to your `pom.xml`:
<dependency>
<groupId>dev.akif</groupId>
<artifactId>e-kotlin</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
</dependencies>
```
If you use SBT, add following to your `build.sbt`:

```kotlin
libraryDependencies += "dev.akif" % "e-kotlin" % "2.0.1"
libraryDependencies += "dev.akif" % "e-kotlin" % "2.0.2"
```

## Contents
Expand Down
20 changes: 10 additions & 10 deletions e-play-json/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[//]: # "This file is generated by [mdoc](https://scalameta.org/mdoc). Do not edit it directly as it will be overwritten. Instead edit corresponding file in docs folder."

# e-play-json [![](https://img.shields.io/badge/docs-2.0.1-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-play-json_2.13)
# e-play-json [![](https://img.shields.io/badge/docs-2.0.2-brightgreen.svg?style=for-the-badge&logo=scala&color=dc322f&labelColor=333333)](https://javadoc.io/doc/dev.akif/e-play-json_2.13)

This is a Json codec implementation for `E` and `EOr` types based on [play-json]((https://github.com/playframework/play-json)). It provides play-json's `Reads` and `Writes` as well as e's own `Codec` (see [e-scala](/e-scala/README.md#3-codec-decoder-and-encoder) docs).

Expand All @@ -9,7 +9,7 @@ This is a Json codec implementation for `E` and `EOr` types based on [play-json]
If you use SBT, add following to your `build.sbt`:

```scala
libraryDependencies += "dev.akif" %% "e-play-json" % "2.0.1"
libraryDependencies += "dev.akif" %% "e-play-json" % "2.0.2"
```
If you use Maven, add following to your `pom.xml` (replace 2.13 if you need a different Scala version):

Expand All @@ -18,15 +18,15 @@ If you use Maven, add following to your `pom.xml` (replace 2.13 if you need a di
<dependency>
<groupId>dev.akif</groupId>
<artifactId>e-play-json_2.13</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
</dependencies>
```
If you use Gradle, add following to your project's `build.gradle` (replace 2.13 if you need a different Scala version):

```javascript
dependencies {
implementation('dev.akif:e-play-json_2.13:2.0.1')
implementation('dev.akif:e-play-json_2.13:2.0.2')
}
```

Expand Down Expand Up @@ -59,10 +59,10 @@ decode[String](Json.toJson("test"))
case class Foo(bar: Boolean)

implicit val fooReads: Reads[Foo] = Json.reads[Foo]
// fooReads: Reads[Foo] = play.api.libs.json.Reads$$anon$6@76d9124
// fooReads: Reads[Foo] = play.api.libs.json.Reads$$anon$6@dfb8284

implicit val fooWrites: Writes[Foo] = Json.writes[Foo]
// fooWrites: Writes[Foo] = play.api.libs.json.OWrites$$anon$4@58d396d3
// fooWrites: Writes[Foo] = play.api.libs.json.OWrites$$anon$4@2f50b87a

decode[Foo](Json.obj())
// res3: e.scala.EOr[Foo] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"name":"obj.bar","message":"error.path.missing"}]}
Expand All @@ -89,7 +89,7 @@ decode[E](Json.arr())
// res7: e.scala.EOr[E] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"name":"obj","message":"error.expected.jsobject"}]}

val decoder = makeDecoder[E]
// decoder: e.scala.codec.Decoder[JsValue, E] = e.scala.codec.CodecFor$$Lambda$13211/0x0000000803530000@26a09934
// decoder: e.scala.codec.Decoder[JsValue, E] = e.scala.codec.CodecFor$$Lambda$13621/0x0000000803544890@2b7df3a8

decoder.decode(Json.obj("code" -> 1, "name" -> "test"))
// res8: e.scala.EOr[E] = {"code":1,"name":"test"}
Expand All @@ -112,7 +112,7 @@ encode(E.name("test").message("Test").cause(E.code(1)))
// res11: play.api.libs.json.JsValue = {"name":"test","message":"Test","causes":[{"code":1}]}

val encoder = makeEncoder[E]
// encoder: e.scala.codec.Encoder[E, play.api.libs.json.JsValue] = e.scala.codec.CodecFor$$Lambda$13216/0x0000000803536000@4774ba6a
// encoder: e.scala.codec.Encoder[E, play.api.libs.json.JsValue] = e.scala.codec.CodecFor$$Lambda$13626/0x0000000803547dd0@10cb3673

encoder.encode(E.code(2))
// res12: play.api.libs.json.JsValue = {"code":2}
Expand All @@ -131,7 +131,7 @@ encode[EOr[Int]](123.toEOr)
// res15: play.api.libs.json.JsValue = 123

val encoder = makeEncoder[EOr[String]]
// encoder: codec.Encoder[EOr[String], play.api.libs.json.JsValue] = e.scala.codec.CodecFor$$Lambda$13216/0x0000000803536000@22c2d89c
// encoder: codec.Encoder[EOr[String], play.api.libs.json.JsValue] = e.scala.codec.CodecFor$$Lambda$13626/0x0000000803547dd0@4c8c98d8

encoder.encode(E.name("test").toEOr[String])
// res16: play.api.libs.json.JsValue = {"name":"test"}
Expand All @@ -156,7 +156,7 @@ object User {
}

val codec = makeCodec[User]
// codec: e.scala.codec.Codec[User, JsValue] = e.scala.codec.CodecFor$$anon$1@5e9eb47a
// codec: e.scala.codec.Codec[User, JsValue] = e.scala.codec.CodecFor$$anon$1@521e7c5

codec.decode(Json.obj("foo" -> "bar"))
// res19: EOr[User] = {"name":"decoding-error","message":"Failed to decode!","causes":[{"name":"obj.age","message":"error.path.missing"},{"name":"obj.name","message":"error.path.missing"}]}
Expand Down
Loading

0 comments on commit 94a18b0

Please sign in to comment.