Browse Source

Merge pull request #6983 from nocodb/fix/6963-json-cell

fix: Invalid json genration
pull/6994/head
Raju Udava 1 year ago committed by GitHub
parent
commit
8f79fd975b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/nc-gui/components/cell/Json.vue

8
packages/nc-gui/components/cell/Json.vue

@ -72,13 +72,7 @@ const clear = () => {
const formatJson = (json: string) => { const formatJson = (json: string) => {
try { try {
json = json return JSON.stringify(JSON.parse(json))
.trim()
.replace(/^\{\s*|\s*\}$/g, '')
.replace(/\n\s*/g, '')
json = `{${json}}`
return json
} catch (e) { } catch (e) {
console.log(e) console.log(e)
return json return json

Loading…
Cancel
Save