jdorn / json-editor

JSON Schema Based Editor
MIT License
5.8k stars 1.08k forks source link

Can I input multi-language attributes? #845

Open kochizufan opened 3 years ago

kochizufan commented 3 years ago

Hi,

I want to realize attribute like this:

If single-language data:

  "name": "Peter"

but in multi-language data:

  "name": {
    "ja": "ピーター",
    "en": "Peter"
  }

According to this topic https://stackoverflow.com/questions/47087869/how-to-represent-jsonschema-of-json-which-key-names-are-in-enum-value , multiple-language attribute is achieved in Json Schema like this:

{
  "type": "object",
  "properties": {
    "name": {
      "type": "object",
      "patternProperties": {
        "^[a-z]{2}$": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "name"
  ]
}

But my question is, such complicated JSON Schema is supported in this library?

If it is not supported, would you please add this as new function?