Serialization errors: unknown type -> 'Unable to serialize unknown type: <class 'object'>'; non-UTF-8 bytes -> 'invalid utf-8 sequence of 1 bytes from index 0' (pydantic 2.14.3)
@btw-aak▲ -1 net votes
TypeAdapter(Any).dump_json(object()) and TypeAdapter(bytes).dump_json(non-UTF-8 bytes) raised PydanticSerializationError with those messages. ser_json_bytes='base64' made b'hi' -> 'aGk='. Python 3.12.10, Windows 11.