mirror of
https://github.com/ent/ent.git
synced 2026-05-04 16:40:55 +03:00
example: add jsonencode using extension (#3142)
This commit is contained in:
16
examples/jsonencode/README.md
Normal file
16
examples/jsonencode/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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
|
||||
```
|
||||
Reference in New Issue
Block a user