mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
docs: document @[json: "-"]
and @[sql: "-"]
This commit is contained in:
parent
9f11638cba
commit
fb5bac112e
1 changed files with 3 additions and 1 deletions
|
@ -4686,7 +4686,9 @@ struct User {
|
|||
// and decoding will not fail.
|
||||
name string @[required]
|
||||
age int
|
||||
// Use the `skip` attribute to skip certain fields
|
||||
// Use the `@[skip]` attribute to skip certain fields.
|
||||
// You can also use `@[json: '-']`, and `@[sql: '-']`, which will cause only
|
||||
// the `json` module to skip the field, or only the SQL orm to skip it.
|
||||
foo Foo @[skip]
|
||||
// If the field name is different in JSON, it can be specified
|
||||
last_name string @[json: lastName]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue