Closed VladPavliuk closed 2 months ago
IMO it would be better to do json:"-"
to match cbor:"-"
and fmt:"-"
which do the same thing in their respective packages.
Please use -
not _
.
@laytan @gingerBill thanks for pointing that out! I didn't know about that already existing ignore functionality in cbor
and fmt
.
The changes where pushed to the branch.
Propose an ability to specify optional
ignore
tag for struct fields to exclude them fromjson.marshal
json object output.Example:
will produce: