Skip to content

Add ability to skip conversion #8

@elgopher

Description

@elgopher

Is your feature request related to a problem? Please describe.
Currently all structs and map[string]any are converted. But there are situations when not all objects should be converted (for example all maps).

Describe the solution you'd like
Provide new callback function ShouldConvert(path, any) (bool, error) which will return true, nil when object should be converted. This function will be called for each struct and map[string]any found during traversing the tree.

Describe alternatives you've considered
Instead of callback a boolean disabling map conversion. But this solution is limited. It will disable all maps, not some of them.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions