Skip to content

v0.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Nov 11:15
· 3 commits to main since this release

Adds compact JSON serialization to skema. A CompactSerializer encodes a sealed vocabulary of nodes as operator objects, bare names, or numeric literals, and toJsonSchema derives a JSON Schema for it straight from the serializers, with no hand-written spec. This replaces the JsonSpec vocabulary; SchemaDiff and the composition helpers are removed.

  • feat: remove JsonSpec, SchemaDef.toJsonSchema, SchemaDiff, and the plus and namespaced composition helpers.
  • feat: add CompactSerializer, which encodes nodes as operator objects, names, or numeric literals.
  • feat: describe nodes with JsonNode and JsonNodeShape (Fields, Operand, Operands, Literal), and select them by fixed field values.
  • feat: map custom payloads through JsonPayloadMapping, including their schemas.
  • feat: add toJsonSchema for compact serializers and for any KSerializer, using JsonNodeCatalog to find nested compact vocabularies.
  • feat: encode value class nodes as their underlying value.
  • feat: accept unquoted names when the Json instance is lenient.
  • fix: keep null entry values in SchemaDef instead of treating them as missing.
  • docs: rewrite the README around declaring schemas and the compact JSON constraints.
  • chore: update Gradle to 9.7.1 and kbuild to 1.3.6, and publish snapshots from main.

Full Changelog: v0.3.0...v0.4.0