Skip to content

Commit

Permalink
Merge pull request #14 from andrewbaine/andrewbaine-patch-1
Browse files Browse the repository at this point in the history
docs: Update README.md to include required flag
  • Loading branch information
jchavarri authored Sep 2, 2024
2 parents 0107f14 + 1d04a07 commit 6737750
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,13 @@ The PPX is included in the `melange-json` package. To use it, just add the

### Usage

To generate JSON converters for a type, add the `[@@deriving json]` attribute to
a type declaration:
To generate JSON converters for a type,
add the `[@@deriving json]` attribute to the type declaration,
ensuring the converters for primitives like `int` and `string` are in scope if necessary:

```ocaml
open Ppx_deriving_json_runtime.Primitives
type t = {
a: int;
b: string;
Expand Down

0 comments on commit 6737750

Please sign in to comment.