question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Objects with '.' characters in keys display with truncated/trimmed keys

See original GitHub issue

Thanks 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

dotinobjectkeyjvm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
pmk65commented, Feb 16, 2019

@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.

1reaction
pmk65commented, Dec 2, 2018

You can use headerTemplate to display any title 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found