Objects with '.' characters in keys display with truncated/trimmed keys
See original GitHub issueThanks for the great library – it’s saving me so much time manually writing complicated editors.
Expected behavior
Schema:
{
"title": "JVM Arguments",
"type": "object",
"required": [
"-Dsun.rmi.dgc.ackTimeout"
],
"properties": {
"-Dsun.rmi.dgc.ackTimeout": {
"type": "string"
}
}
}
Object:
{
"-Dsun.rmi.dgc.ackTimeout": "10000"
}
I’d expect the form to use -Dsun.rmi.dgc.ackTimeout
instead of ackTimeout
for the header.
It looks like this has something to do with path computations splitting on ‘.’
Normally I’d try find a different separator to use, but since my editor is showing JVM arguments, I don’t have a choice except to display with '.'s.
Actual behavior
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top Results From Across the Web
Silent Data truncation in SQL Server 2019 - SQLShack
This trace flag displays the SQL truncate error message – “String or binary data would be truncated in table '%.*ls', column '%.*ls'. Truncated...
Read more >TRUNCATE TABLE
Use the TRUNCATE TABLE statement to remove all rows from a table. By default, Oracle Database also performs the following tasks:.
Read more >Limit and Truncate a String to a Given Length in JavaScript ...
This tutorial shows you how to limit a string in JavaScript to a certain number of characters and truncate the string in case...
Read more >Text was truncated or one or more characters had no match in ...
Text was truncated or one or more characters had no match in the target code page including the primary key in an unpivot....
Read more >Truncation - Lightning Design System
There is an iOS bug that is triggered when you add a component from Visualforce into S1 using an iFrame. The truncated element...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@co16353sidak I can see that @disalvjn did some work on this, see: https://github.com/disalvjn/json-editor/commit/417070eb2ffd34f1f95d9ea24d74879b27ab47fa But since he never committed it to the main repo, I guess you can take over if you want.
The problem is not the title, but that he is using dots in the field names. This is just not possible as JSON-Editor uses dots as a separator between identifiers.
If you have a field in you schema named “test”, JSON-Editor refers to this as “root.test” So if you name your field “te.st”, JSON-Editor won’t be able to separate the various parts of the identifier,
You will probably have to filter the schema and change dots to some other characters, before applying it to JSON-Editor. And then do the same to restore the field names, after retrieving the result object.