:blob_wave: wondering if anyone has tried to make ...
# ask-community
j
👋 wondering if anyone has tried to make a generic json io manager with pydantic or dataclasses? would love to hear of anyone’s ideas! Full use case is being able to serialize/deserialize separate model definitions in cross repo assets
t
Hi! When you mention Pydantic/Dataclasses, do you mind that you want your connections/resources/config validated by Pydantic or that you want it to be validated during and reads/writes? Based on your use case, it's sounding like the latter. I haven't thought that through and that's pretty valuable feedback since data contracts are the big f a n c y thing nowadays. I think a current work around would be to validate before writing the asset (likely in the asset def code, which is easier to modify than writing your own IO Manager), abstracting out the validation logic into a util, and then validating it again in the other project using observable source assets to both validate the schema and data changes to it.