Skip to content

Commit 34a9bdb

Browse files
authored
Merge pull request #350 from theiterators/2.0-fixes
removing redundant dependencies and code
2 parents c9d4f4f + c96c0fb commit 34a9bdb

File tree

42 files changed

+219
-718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+219
-718
lines changed

README.md

+2-23
Original file line numberDiff line numberDiff line change
@@ -520,18 +520,6 @@ test("work with nested single field objects") {
520520
}
521521
```
522522

523-
* mix-in `KebsSpray.NonFlat` if you want _flat_ format to become globally turned off for a protocol
524-
```scala
525-
object KebsProtocol extends DefaultJsonProtocol with KebsSpray.NoFlat
526-
```
527-
528-
* use `noflat` annotation on selected case-classes (thanks to @dbronecki)
529-
```scala
530-
case class Book(name: String, chapters: List[Chapter])
531-
@noflat case class Chapter(name: String)
532-
```
533-
534-
535523
Often you have to deal with convention to have **`snake-case` fields in JSON**.
536524
That's something `kebs-spray-json` can do for you as well
537525

@@ -663,10 +651,7 @@ object AfterKebs {
663651
}
664652
}
665653
```
666-
If you want to disable flat formats, you can mix-in `KebsCirce.NoFlat`:
667-
```scala
668-
object KebsProtocol extends KebsCirce with KebsCirce.NoFlat
669-
```
654+
670655
You can also support snake-case fields in JSON:
671656
```scala
672657
object KebsProtocol extends KebsCirce with KebsCirce.Snakified
@@ -678,8 +663,7 @@ And capitalized:
678663
```
679664

680665
**NOTE for Scala 3 version of kebs-circe**:
681-
1. As of today, there is no support for the @noflat annotation - using it will have no effect.
682-
2. If you're using recursive types - due to [this issue](https://github.com/circe/circe/issues/1980) you'll have to add codecs explicitly in the following way:
666+
If you're using recursive types - due to [this issue](https://github.com/circe/circe/issues/1980) you'll have to add codecs explicitly in the following way:
683667
```scala
684668
case class R(a: Int, rs: Seq[R]) derives Decoder, Encoder.AsObject
685669
```
@@ -691,11 +675,6 @@ case class R(a: Int, rs: Seq[R]) derives Decoder, Encoder.AsObject
691675
import KebsProtocol.{given, _}
692676
```
693677

694-
as for NoFlat, it should stay the same:
695-
```scala
696-
object KebsProtocol extends KebsCirce with KebsCirce.NoFlat
697-
import KebsProtocol._
698-
```
699678
#### - kebs generates akka-http / pekko-http Unmarshaller (kebs-akka-http / kebs-pekko-http)
700679

701680
It makes it very easy to use 1-element case-classes or `enumeratum` enums/value enums in eg. `parameters` directive:

benchmarks/src/main/scala/pl/iterators/kebs/benchmarks/SprayJsonFormatBenchmark.scala

-284
This file was deleted.

0 commit comments

Comments
 (0)