Schema with dotted property names - how to disable automatic parsing?

Hello,
my schema has dotted property names like this:

{
    "title": "Settings",
    "type": "object",
    "properties": {
        "core.gateways.web.DefaultRenderer": {
            "title": "Default Renderer"
        }
    }
}

By default (without any UI Schema) my generated data is resulting this:

{
    "core": {
        "gateways": {
            "web": {
                "ExpressionRenderer": {
                    "expression": "something"
                }
            }
        }
    }
}

But Iā€™m expecting something like this:

{
    "core.gateways.web.ExpressionRenderer": {
        "expression": "something"
    }
}

Is this AVJ behavior or is it something I can configure on JsonForms package?

Thanks a lot

Hi!

Sadly this is an open issue and not yet fixed in JSON Forms. Internally we use . as the object separator. The clean fix to use an array of path segments instead however is not straightforward as a naive implementation breaks our caching/memo. Therefore we plan to fix this only after the 3.0 release which is of higher priority atm.

As a workaround you can escape the dots with something else before handing the schema over to JSON Forms and then transform the data you get out of JSON Forms. Note that if you manage your UI Schema manually you will then need to use the escaped property names within the scopes.

1 Like

Thank you Stefan for the quick answer on this, really appreciated it!
We will try your suggestion, congrats on the great work here!

1 Like