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.

How to express generic object

See original GitHub issue

General information

  • json-editor version: 2.0.0

I’m wondering how I could express a generic object with no specific properties in json-editor, example with this schema:

{
  "title": "Example",
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {}
    },
  }
}

I expect field data should have a dynamic textarea to fill in any generic json, is that possible to change the schema for this behaviour?

Here is the full example: https://jsfiddle.net/2eyr57tj/

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
germanbisurgicommented, Feb 14, 2020

Why not a string format textarea?

0reactions
germanbisurgicommented, Feb 15, 2020

Manually, but you can listen for change events for that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generic Methods - Java™ Tutorials
Generic methods allow type parameters to be used to express dependencies among the types of one or more arguments to a method and/or...
Read more >
Generics in Java - GeeksforGeeks
Like C++, we use <> to specify parameter types in generic class creation. To create objects of a generic class, we use the...
Read more >
java - How can I access the the type of a generic object?
Even without generics, you cannot do anything like this: Timezone object = (Timezone) new Object();. new Object() will create an object whose runtime...
Read more >
How To Use Generics in TypeScript - DigitalOcean
To see how useful generics are, imagine that you have a JavaScript function that takes two parameters: an object and an array of...
Read more >
The Basics of Java Generics - Baeldung
The defined list could hold any object. We only know that we are retrieving a list by inspecting the context. When looking at...
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