Is there a easier way to handle JSONData without type checking every time
Hi Guys!, I am trying to use an serialized record object in my typescript app, but it shows an error stating that there is a possibility of the value could be JSONDataFile. So do I have to type check if it's a string every time or Is there a easier way ?

1 Reply
Hey there. We've got some docs here that might interest you. I don't know if you're working with Next JS (likely if you're serializing a lot), but this should give you an example. https://xata.io/docs/sdk/typescript/overview#serializing-xata-data-structures
Xata SDK for TypeScript and JavaScript
Use the SDK as a schema-based, schema-less, or an API client