Skip to content

Validation and serialization improvements#107

Merged
confluence merged 3 commits intodevfrom
confluence/isinstance-validator-and-better-serialization
Apr 21, 2023
Merged

Validation and serialization improvements#107
confluence merged 3 commits intodevfrom
confluence/isinstance-validator-and-better-serialization

Conversation

@confluence
Copy link
Copy Markdown
Collaborator

This PR:

  • Adds a new InstanceOf validator which just checks the value against a type or tuple of types (using isinstance under the hood).
  • Fixes the IterableOf validator to add a more specific error message if the value isn't iterable at all, and to make the description more readable
  • Moves the macro-specific serialization logic from the serializer to the Macro object. Any custom object with a json method will now use that method for serialization.

…terable validator; simplified JSON serializer logic
@confluence confluence merged commit 1ae08c5 into dev Apr 21, 2023
@confluence confluence deleted the confluence/isinstance-validator-and-better-serialization branch April 21, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants