Skip to content

Add "Copy JSON" / "Save JSON" option to row selection export menu in Prisma Studio #1560

Description

@SouhailKrs

Problem

When working with data in Prisma Studio, I often need to copy selected rows in a format I can paste directly into code, API request bodies, config files, or test fixtures. JSON is the most natural format for this, pasting into a JS/TS file, a REST client, or a mock data file all expect JSON, not Markdown tables or CSV.

Currently I have to copy as CSV or Markdown and manually convert it to JSON, which is extra friction for a very common workflow, especially when working with nested/relational data where JSON preserves structure better than a flat table format.

Proposed solution

Add "copy json" and "save json" entries to the existing "copy as" dropdown (see attached screenshot), next to "copy csv" and "save csv".

  • Selecting one or more rows and choosing "copy json" would copy the selected rows to the clipboard as a JSON array of objects, with column names as object keys.
  • "save json" would download the same output as a .json file.
  • The existing "include column header" toggle should not apply to JSON output, since JSON is already self-describing (keys = column names) and there's no equivalent "headerless" concept the way there is for CSV/Markdown. Open to feedback from maintainers if they'd prefer different behavior here (e.g. a headerless array-of-arrays mode).

Alternatives

Currently the only workaround is to copy as CSV or Markdown and convert to JSON manually outside of Studio (e.g. via a script or an online converter), which is slow and disrupts the workflow, especially for quick one-off lookups directly in Studio.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureA request for a new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions