baidu / baidu/amis

json-editor编辑后提交的数据类型会发生改变

Open
#3,689 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

curd组件
json字段 如果不做任何修改,请求提交的字段类型为json object
如果有改动,请求提交的字段类型会变成string (validations配置 只会做内容是否是json的校验,不影响字段类型)
问题:提交的字段类型是否可以统一

展示配置:
{
"type":"json",
"name": "config1",
"label": "配置1"
}
表单配置:
{
"type":"json-editor",
"name": "config1",
"label": "配置1",
"validations": "isJson"
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the curd display configuration and json-editor form configuration provided in the report. Trace how the json field is serialized on submission before and after editing; done means both paths submit the field with the same data type while retaining the existing JSON validation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.