json-editor icon indicating copy to clipboard operation
json-editor copied to clipboard

Can I input multi-language attributes?

Open kochizufan opened this issue 3 years ago • 0 comments

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?

kochizufan avatar Apr 22 '21 00:04 kochizufan