Take for example the following variant type.
data Tree = Empty
| Leaf Int
| Node Tree Tree
In JSON you can use the following three forms to specify the three variants.
Variant | JSON
--------+---------------
Empty | null
--------+---------------
Leaf | {
| "leaf": 7
| }
--------+---------------
Node | {
| "node": [
| <tree>,
| <tree>
| ]
| }
Basically, use a JSON object with a single key-value pair, where the key is the selected variant.