local json = require('rapidjson')
local schema = {
type = "object",
properties = {
key = {type = "string"},
secret = {type = "string", default = "xxxxxxxxx"}
}
}
local value = {key = 'zzz'}
local sd = rapidjson.SchemaDocument(schema)
local validator = rapidjson.SchemaValidator(sd)
local d = rapidjson.Document(value)
local ok, message = validator:validate(d)
I think we can get new value {key='zzz', default = "xxxxxxxxx"}, how can I get the new value.