Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Need support for omitempty & - on attr fields. #33

@thedodd

Description

@thedodd

There are conditions where a model is used in different circumstances, for different responses, and a field may be present, or not present depending on the circumstance. Standard library supports the omitempty and - tokens in the json:"" tag. It would be great to offer the same thing here.

Maybe a third value can be passed: jsonapi:"attr,myfield,omitempty" or something of the sort.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions