Skip to content

Commit

Permalink
ppx: undocument native ppx
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Aug 16, 2024
1 parent d95fd08 commit 3a31039
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions ppx/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
# PPX

A [ppx deriver plugin][] for converting OCaml values to and from JSON. Works
both in native (using `yojson` JSON representation) and [melange][] (using
`Js.Json.t` JSON representation).
A [ppx deriver plugin][] for converting OCaml values to and from JSON. Works on
[melange][] (using `Js.Json.t` JSON representation).

## Installation

The PPX is included in `melange-json` package. To use it, just add the `dune`
configuration to your project:

```dune
(executable
...
(preprocess (pps melange-json.ppx-native)))
(library
(modes melange)
(preprocess (pps melange-json.ppx)))
```

Note that you need to use the `melange-json.ppx-native` preprocessor for OCaml
native and the `melange-json.ppx` preprocessor for Melange.

## Usage

To generate JSON converters for a type, add the `[@@deriving json]` attribute to
Expand Down

0 comments on commit 3a31039

Please sign in to comment.