Skip to content

Fix Json column ReadForeign to parse JSON strings#1

Merged
i-am-the-slime merged 1 commit into
mainfrom
fix-json-readforeign
Apr 11, 2026
Merged

Fix Json column ReadForeign to parse JSON strings#1
i-am-the-slime merged 1 commit into
mainfrom
fix-json-readforeign

Conversation

@i-am-the-slime
Copy link
Copy Markdown
Member

Summary

  • Fix ReadForeign Json instance to call parseJSON on the string value returned by SQLite, instead of wrapping the raw string as Foreign
  • Update Json round-trip test to verify parsed content matches the original object

Problem

When selecting a Json column, SQLite returns the value as a TEXT string. The ReadForeign Json instance was wrapping this string directly (pure <<< Json), so the Json newtype contained a string rather than a parsed JSON object.

Fix

Follow the same pattern as SQLDate/SQLTime — first read the Foreign as a String, then parse it with parseJSON from yoga-json.

🤖 Generated with Claude Code

@i-am-the-slime i-am-the-slime merged commit ad83bde into main Apr 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant