supabase / supabase

The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
https://supabase.com
Apache License 2.0
73.61k stars 7.11k forks source link

paste text into Table Editor create view - jsonB not parsing correctly #15552

Open MildTomato opened 1 year ago

MildTomato commented 1 year ago

Bug report

Describe the bug

JSON is not being parsed correctly in the paste text side panel when creating a new table via the Studio UI.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to supabase.com/dashboard
  2. New table, use these columns
    • reference:string, status:string, cargo:jsonb
  3. "Import data via spreadsheet"
  4. paste the following

    reference,status,cargo
    abc123,offline,[ { "age": 23, "name": "Jane" }, { "age": 25, "name": "John" } ]

    error is : Too many fields: expected 3 fields but parsed 6

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Screenshot 2023-07-04 at 6 05 21 PM

System information

Additional context

Add any other context about the problem here.

ivasilov commented 1 year ago

Reported an issue to papaparse, the library we use for parsing.

KevinBrolly commented 10 months ago

@ivasilov Looks like the papaparse issue is closed as Wontfix, so we would need to either use a different library or patch ourselves to fix this issue.