Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavyajain21 authored Apr 25, 2024
1 parent a35ca02 commit fa45467
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[//]: # "This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command."
[//]: # 'So please do not edit it manually. Instead, change "docs/index.md" file or sbt setting keys'
[//]: # 'e.g. "readmeDocumentation" and "readmeSupport".'
[//]: # (This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command.)
[//]: # (So please do not edit it manually. Instead, change "docs/index.md" file or sbt setting keys)
[//]: # (e.g. "readmeDocumentation" and "readmeSupport".)

# ZIO JSON

Expand Down Expand Up @@ -41,7 +41,7 @@ import zio.json._
Say we want to be able to read some JSON like

```json
{ "curvature": 0.5 }
{"curvature":0.5}
```

into a Scala `case class`
Expand All @@ -50,7 +50,7 @@ into a Scala `case class`
case class Banana(curvature: Double)
```

To do this, we create an _instance_ of the `JsonDecoder` typeclass for `Banana` using the `zio-json` code generator. It is best practice to put it on the companion of `Banana`, like so
To do this, we create an *instance* of the `JsonDecoder` typeclass for `Banana` using the `zio-json` code generator. It is best practice to put it on the companion of `Banana`, like so

```scala
object Banana {
Expand Down Expand Up @@ -151,7 +151,7 @@ List(Apple(false), Banana(0.4)).toJsonPretty

Extreme **performance** is achieved by decoding JSON directly from the input source into business objects (docs/inspired by [plokhotnyuk](https://github.com/plokhotnyuk/jsoniter-scala)). Although not a requirement, the latest advances in [Java Loom](https://wiki.openjdk.java.net/display/loom/Main) can be used to support arbitrarily large payloads with near-zero overhead.

Best in class **security** is achieved with an aggressive _early exit_ strategy that avoids costly stack traces, even when parsing malformed numbers. Malicious (and badly formed) payloads are rejected before finishing reading.
Best in class **security** is achieved with an aggressive *early exit* strategy that avoids costly stack traces, even when parsing malformed numbers. Malicious (and badly formed) payloads are rejected before finishing reading.

**Fast compilation** and **future-proofing** is possible thanks to [Magnolia](https://propensive.com/opensource/magnolia/) which allows us to generate boilerplate in a way that will survive the exodus to Scala 3. `zio-json` is internally implemented using a [`java.io.Reader`](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/io/Reader.html) / [`java.io.Writer`](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/io/Writer.html)-like interface, which is making a comeback to center stage in Loom.

Expand Down

0 comments on commit fa45467

Please sign in to comment.