Effect CommunityEC
Effect Community16mo ago
5 replies
funkatronixxx

Handling Opaque JSON Data in Struct Definitions

Is there a recommended way to handle "opaque" data. I have an object (json data) that I want to just pass through cleanly.
const StoryState = S.Struct({
  title: S.NullOr(S.String),
  contentBlocks: S.NullOr(S.Any), // <- object/json
});
Was this page helpful?