everit

Everit schema builder includes unset properties as null

安稳与你 提交于 2020-12-15 05:42:57
问题 Trying to build and use the Schema object: Schema rootSchema = ObjectSchema.builder() .additionalProperties(true) .build(); It seems to work fine until I try to serialize it as a string and then to reload using the SchemaLoader: String json = objectMapper.writeValueAsString(rootSchema); JSONObject schemaObject = new JSONObject(json); Schema schema = SchemaLoader.load(schemaObject); The problem is that the unset keywords are serialized as null: { "title" : null, "description" : null, "id" :