JSON schema example (Method 1)

This is a JSON Schema example for data objects containing localized strings, using method 1:

{ 
   "$schema":"http://json-schema.org/draft-06/schema#",
   "type":"object",
   "properties":{ 
      "id":{ 
         "description":"The identifier",
         "type":"string",
         "maxLength":40
      },
      "description":{ 
         "description":"Additional information",
         "type":"object",
         "x-localized":true,
         "x-propertiesMaxLength":250,
	   “additionalProperties”:true
      }
   }
}

Inside the data objects, localized properties must include the supported locales, along with their associated string values.

This example of a data object relates to the JSON Schema example for data objects containing localized strings.

{"id":"123","description":{"en_US":"car","es_ES":"coche"}}

The description property contains values for two locales; one for en_US and another for es_ES.