Commit Graph

4 Commits (4890563c27a6ba237a9b163c794696cb7f42781a)

Author SHA1 Message Date
Vinícius Garcia 4890563c27 Expose some public types and functions so users can register new modifiers 2022-10-18 12:53:25 -03:00
Vinícius Garcia 136ee66fe9 Fix behavior of json modifier to match what json.Unmarshal does for nil values
In the original implementation I thought that the `json` package
would set fields to its zero value during unmarshal if the input
JSON had a `null` value for that attribute.

After performing an small experiment I noticed this is not the case.

Thus, I have removed that behavior and now if the json contains
a `null` value for a field this field will be ignored by the
json modifier thus keeping its original value whatever it was.
2022-10-18 10:41:49 -03:00
Vinícius Garcia 8cba3efa2d Refactor modifiers so it is represented by a struct 2022-09-26 01:37:23 -03:00
Vinícius Garcia 9e94445cdc Add tests to the modifiers package 2022-09-23 22:49:41 -03:00