Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
andreypopp committed Apr 3, 2024
1 parent ec465bc commit f019e2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Then you can install the package:
opam install -y ppx_deriving_json
```

Finally add the `dune` configuration to your project:
Finally, add the `dune` configuration to your project:

```dune
(executable
Expand Down Expand Up @@ -60,7 +60,7 @@ val of_json : Js.Json.t -> t
val to_json : t -> Js.Json.t
```

### Generating JSON converters from a type expressions
### Generating JSON converters from type expressions

You can also generate JSON converters for a type expression using the `to_json` and `of_json` extension points:

Expand Down Expand Up @@ -112,7 +112,7 @@ let t = of_json (`Assoc ["A", `Int 42; "B", `String "foo"])
(* t = { a = 42; b = "foo"; } *)
```

### `[@json.as "S"]`: customizing representation of a variant case
### `[@json.as "S"]`: customizing the representation of a variant case

You can specify custom representation for a variant case using the `[@json.as E]` attribute:

Expand Down

0 comments on commit f019e2a

Please sign in to comment.