Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patternProperties: keys are not shown and can't add additional data instances #814

Open
fatbearinc opened this issue Mar 26, 2018 · 1 comment

Comments

@fatbearinc
Copy link

I've noticed two issues when using patternProperties:

  1. The generated form does not show the value (regex actual match) for keys. In the example below, I would want to see the names Art, Bruce, and Steve on the form.

  2. In addition, there is no widget providing the ability in the form to add additional key-value pairs. For example, I have no way of adding the name Mary with the office number 6104.

I used your JSON Editor Example webpage to be able to intepret the following JSON data and schema as shown below.

data:

{
   "offices":
   {
      "Art": "3240",
      "Bruce": "4184",
      "Steve": "1175"
   }
}

schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Employee Offices",
  "type": "object",
  "properties": {
    "offices": {
      "title": "Offices",
      "description": "Employee Offices",
      "type": "object",
      "patternProperties": {
        "^.*$": {
          "type": "string",
          "title": "Office #",
          "description": "The person's office number"
        }
      }
    }
  }
}
@schmunk42
Copy link
Collaborator

This repo is no longer maintained (see also #800)

Development is continued at https://github.com/json-editor/json-editor

For details please visit json-editor/json-editor#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants