jsonforms
jsonforms copied to clipboard
special character in property name (dot)
Describe the bug I have '.' in one property name it's creating key in form like object.key example:
"parameters": {
"type": "object",
"properties": {
"rds.logical_replication": {
"type": "string",
"enum": [
"1",
"0"
],
"default": "1"
}
}
},
{
"type": "FoldableGroup",
"id": "parameters",
"parentId": "database",
"label": "DB Parameter",
"scope": "#/properties/extraResources/properties/database/properties/parameters",
"elements": [
{
"type": "Control",
"label": "rds.logical_replication",
"scope": "#/properties/extraResources/properties/database/properties/parameters/properties/rds.logical_replication"
}
]
},
The output looks like this
"parameters": {
"rds": {
"logical_replication": "0"
},
"rds.logical_replication": "1"
},
Expected behavior
"parameters": {
"rds.logical_replication": "1"
},
i think the problem is with the scope
#/properties/extraResources/properties/database/properties/parameters/properties/rds.logical_replication
is there way i can escap special characther?
Used Setup (please complete the following information): react
Hi @Deepak1100, we're using lodash's get internally so you could try escaping the property with quotation marks.
Either way we should get this fixed in JSON Forms at some point! Thanks for the report!
Hello. We are using jsonforms with the Material UI renderers. Would this issue be related to why when using the boolean control, special characters are getting stripped from property names? The label of the control seems to be sanitized.
Property in schema: Band & Orchestra: {type: Boolean}
This is rendered via MaterialBooleanControl/MUI Checkbox

Update: It turns out the we just did not have label properties included in the schema for these items. Once adding, the special characters rendered fine.
Hello. We are using jsonforms with the Material UI renderers. Would this issue be related to why when using the boolean control, special characters are getting stripped from property names? The label of the control seems to be sanitized.
Property in schema: Band & Orchestra: {type: Boolean}
This is rendered via MaterialBooleanControl/MUI Checkbox
Update: It turns out the we just did not have label properties included in the schema for these items. Once adding, the special characters rendered fine.
Hi @emergencyofstate, we use lodash's startCase on the property name when there are no JSON Schema title or UI Schema label defined. Among other things it removes special characters.
Hello, may I know that is there any plan for this issue? thanks.
We settled on an improvement, documented it in #2153 and will start developing it soon. Therefore I'll close this issue as the follow up already exists.