kaml
kaml copied to clipboard
Interoperability with `JsonElement`
Describe the problem you'd like to solve
There are several third-party libraries, like https://github.com/optimumcode/json-schema-validator/, that take a JsonElement. Such libraries are currently not usable with Kaml, which uses its own YamlNode (and generally seems to "reinvent" even those data types that are available in JSON, too).
Describe the solution you'd like
As in many cases YAML is mapable to JSON, it would be nice if there was e.g. a YamlNode.toJsonElement() function that does exactly that, and throws if a conversion to a corresponding JSON structure is not possible.
Describe alternatives you've considered
No response
Additional context
I would like to validate YAML configuration files against JSON schema definitions.