example: add jsonencode using extension (#3142)

This commit is contained in:
Ariel Mashraki
2022-12-04 10:38:23 +02:00
committed by GitHub
parent f40fff0f5c
commit 3f1d7c960e
39 changed files with 7024 additions and 4 deletions

View 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
```