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
I'd like to be able to validate my parsed file on my own after unmarshalling from JSON, and preferably without duplicating the behavior already present. My recommendation is to remove the validation, or at a minimum, update the documentation to more specifically address the behavior of the function.
The text was updated successfully, but these errors were encountered:
I can see where removing this check helps to keep errors from unmarshaling and validation isolated. It'd need to be in a new minor release.
return file, err was meant to return the entire file even if Validation errors occurred, but it's non-trivial to detect which type of error was returned.
I noticed this when trying to load an ACH file from JSON using
file.UnmarshalJSON
.The documentation states that the resulting file should be validated, as it may be invalid.
ach/file.go
Lines 98 to 103 in 85a464f
However, before returning a successful file, validation is called resulting in an error:
ach/file.go
Lines 166 to 168 in 85a464f
I'd like to be able to validate my parsed file on my own after unmarshalling from JSON, and preferably without duplicating the behavior already present. My recommendation is to remove the validation, or at a minimum, update the documentation to more specifically address the behavior of the function.
The text was updated successfully, but these errors were encountered: