Skip to content

feat(ios): view and edit JSON values on the row screen - #3686

Merged
datlechin merged 5 commits into
mainfrom
feat/ios-json-viewer
Oct 20, 2026
Merged

datlechin merged 5 commits into
mainfrom
feat/ios-json-viewer

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • A json or jsonb field on the row screen shows indented, with View as JSON: Text and Tree modes, Copy, and Copy Value, Copy Key and Copy Key Path on tree rows. A text column holding a JSON object or array gets the same viewer.
  • Editing a JSON field opens Edit JSON: monospaced, no smart quotes, dashes or autocorrect, Format to reindent, and the line, column and reason of the first error under the text. Done and Save stay off while the JSON is invalid. The value saves as typed.
  • After Save the row reads the saved columns back, so it shows what the server stored.
  • Value fields in the row editor, Add Row and the filter sheet no longer turn quotes curly.
  • Copy, Share and Export never write a prefix... (N KB) or [BLOB N] placeholder. The table browser loads values over 4 KB in full first. A binary value, or a cut value in query results, shows Cannot Export.
  • Edit and Delete need a key that is not binary. A cut text key is read whole from its ref. A delete that leaves the row in the table shows Row Not Deleted, also under SQL Server SET NOCOUNT ON.
  • Load full value on a row that is gone reports it instead of showing NULL.
  • JSON export escapes control characters.
  • An emptied MariaDB JSON field saves NULL, not ''.
  • Number fields in Add Row get a keyboard with a minus sign.

Test plan

  • Fail on main, pass here: ColumnInfoTypeFamilyTests, JSONPrettyPrinterTests, JSONOutlineTests (TableProCore), JSONValidationTests, LiteralInputTraitsTests, and the new cases in RowDetailViewModelTests, DataBrowserViewModelTests, ClipboardExporterFidelityTests.
  • Changed on purpose: loadedLongTextSavesItsEdit now returns the saved text from its loader, since Save reads the value back.
  • iOS 27 simulator, seeded SQLite table with a JSON column: row screen, Text and Tree, Edit JSON with a trailing comma shows Line 18, column 1: Unexpected character. with Done dimmed.
Before After
Row, light Before, light After, light
Row, dark Before, dark After, dark
Editing, light Before, editing, light After, editing, light
Editing, dark Before, editing, dark After, editing, dark
Light Dark
Text Viewer text, light Viewer text, dark
Tree Viewer tree, light Viewer tree, dark
Edit JSON Editor error, light Editor error, dark

Not in this PR

Fixes #3637

# Conflicts:
#	apple/TableProMobile/TableProMobile/Localizable.xcstrings
# Conflicts:
#	apple/TableProMobile/TableProMobile/Localizable.xcstrings
#	apple/TableProMobile/TableProMobile/ViewModels/DataBrowserViewModel.swift
#	apple/TableProMobile/TableProMobile/ViewModels/RowDetailViewModel.swift
#	apple/TableProMobile/TableProMobile/Views/DataBrowserView.swift
#	apple/TableProMobile/TableProMobile/Views/RowDetailView.swift
#	apple/TableProMobile/TableProMobileTests/DataBrowserViewModelTests.swift
# Conflicts:
#	apple/TableProMobile/TableProMobile/Localizable.xcstrings
@datlechin
datlechin disabled auto-merge October 20, 2026 04:33
@datlechin
datlechin merged commit 39451eb into main Oct 20, 2026
8 checks passed
@datlechin
datlechin deleted the feat/ios-json-viewer branch October 20, 2026 05:10
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.

JSON viewer and editor on iPhone and iPad

1 participant