Custom JSON serializers for primary model classes