Extract JsonSchema hooks to separate module for easier testing.