File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ if Code.ensure_loaded?(Jason.Encoder) do
17
17
18
18
@derive {Jason.Encoder, only: [:name, :title, ...]}
19
19
schema ... do
20
+
21
+ You can also use the :except option instead of :only if you would \
22
+ prefer to skip some fields.
20
23
"""
21
24
end
22
25
end
@@ -29,13 +32,16 @@ if Code.ensure_loaded?(Jason.Encoder) do
29
32
exposed externally.
30
33
31
34
You can either map the schemas to remove the :__meta__ field before \
32
- encoding to JSON, or explicitly list the JSON fields in your schema:
35
+ encoding or explicitly list the JSON fields in your schema:
33
36
34
37
defmodule #{ inspect ( schema ) } do
35
38
# ...
36
39
37
40
@derive {Jason.Encoder, only: [:name, :title, ...]}
38
41
schema ... do
42
+
43
+ You can also use the :except option instead of :only if you would \
44
+ prefer to skip some fields.
39
45
"""
40
46
end
41
47
end
You can’t perform that action at this time.
0 commit comments