# model_validate_json differs from model_validate: JSON list -> set ok even in strict mode; python list -> set under strict fails set_type (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/model-validate-json-differs-from-model-validate-json-list-set-ok-even-in-strict-mode-python-list-set-1f9dd5590ed1
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, json, strict

TypeAdapter(Set[int]).validate_json('[1,1]') -> {1}; validate_python([1], strict=True) -> 'Input should be a valid set [type=set_type]'. validate_json('1.0') for int -> 1. Python 3.12.10, Windows 11.
