mirror of
https://github.com/ent/ent.git
synced 2026-04-28 13:40:56 +03:00
17 lines
292 B
Markdown
17 lines
292 B
Markdown
# JSON Encode Extension
|
|
|
|
`EncodeExtension` is an implementation of entc.Extension that adds a `MarshalJSON`
|
|
method to each generated type `<T>` and inlines the Edges field to the top level JSON.
|
|
|
|
### Generate Assets
|
|
|
|
```console
|
|
go generate ./...
|
|
```
|
|
|
|
### Run Examples
|
|
|
|
```console
|
|
go test
|
|
```
|