zio-json
zio-json copied to clipboard
Fast, secure JSON library with tight ZIO integration.
The macro configuration added in #811 does not support scala 3 due to an underlying magnolia issue: https://github.com/softwaremill/magnolia/issues/296 This required a little digging in the code to find out so...
This change allows to set `@jsonMemberNames` annotation on enum (sealed trait) to affect all cases, so it is no longer necessary to add the annotation to each of the cases...
It is not possible to do this with zio-json-interop-refined:`JsonDecoder[ast.Json.Obj Refined Empty]`. This is because the `Empty` validation requires the target to implement `Iterable`, and `ast.Json.Obj` does not. There may be...
As the title says, `encodeJsonArrayPipeline` results in invalid JSON object if `ZStream` is empty. This code, for example: ``` ZStream.from(List()) .via(zio.json.JsonEncoder[String].encodeJsonArrayPipeline) .run(ZSink.mkString) ``` produces the value `]`. Expected value is...
There should be a `decodeInputStream` method on `JsonDecoder` for JVM. I'll provide some notes on my use case (and performance) and how I wrote an equivalent in user-space. I have...
Maybe I'm missing something and there is already a (much better) way to do this... But when using `Either`, the JSON serialization does not do what I was hoping for:...
```scala import zio.json.* @jsonDiscriminator("type") sealed trait GithubIssue derives JsonCodec @jsonHint("bug") case class Bug(`type`: String, title: String) extends GithubIssue @main def reproduce = { val bug:GithubIssue = Bug("bug", "duplicate keys are...
- annotation handling - decoders for recursive data structures
changed the Json.Num case in jsonToYaml to use BigDecimal.longValue instead of intValue added a test contributing link in the readme is a[dead link](https://zio.dev/about/contributing) so not sure if you need anything...
Accumulating error enables to get and return all occured errors during Json decoding: ```scala import zio.json.* case class User(name: String, age: Int) given JsonDecoder[User] = DeriveJsonDecoder.gen """{"name":5,"age":"Iltotore"}""".fromJsonAcc[User] //Hypothetic method //Invalid...