You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is the condition to serialize a field. However today it's just verified if it has a tag with any value or haven't, if it contains tag with some value it'll be serialize but if not it'll be ignored.
The purpose is to make the validation even if there's tag or not. Letting the struct typing more clean like this example below:
...typeTaskListstruct {
OwnerOwner// Tag isn't necessary anymoreTasks []Task// Tag isn't necessary anymore
}
The text was updated successfully, but these errors were encountered:
It's a problem how gody works today because of necessity for tags in slice and struct.
An example about how it works today:
The tag with some value is necessary for validation of fields above (
Owner
andTasks
).Take a look at line: https://github.com/guiferpa/gody/blob/master/serialize.go#L49-L53
There is the condition to serialize a field. However today it's just verified if it has a tag with any value or haven't, if it contains tag with some value it'll be serialize but if not it'll be ignored.
The purpose is to make the validation even if there's tag or not. Letting the struct typing more clean like this example below:
The text was updated successfully, but these errors were encountered: