Skip to content

jsonkit.1.1.0

Latest

Choose a tag to compare

@pedrobslisboa pedrobslisboa released this 17 Sep 12:29
· 5 commits to main since this release
  • Fix the of_json deriver for polymorphic variants with inherited rows, on
    both backends. Decoding now tries, in this order: the type's own tags, then
    the inherited types (in definition order), then the [@json.catch_all] row,
    then the error (or [@json.allow_any]). It no longer depends on the row
    order in the definition: an inherited type listed before an own tag used to
    shadow it on Melange, and an own catch-all used to swallow every tag of the
    inherited types on both backends.
  • Fix: use the len value as an expression on the variant case function to avoid
    expected "named" value to be declared on the function.
  • Fix: remove the duplicated runtime deps from the ppx libraries.
  • Move the JSON Schema runtime into the main packages, at Jsonkit.Jsonschema.
    It is the same API under a new path, on both backends, so sources shared
    between a native and a Melange build need no per-backend conditionals. The
    JSON runtime is unchanged and stays where it is: everything previously at
    Jsonkit.* is still at Jsonkit.*, and is now also reachable as
    Jsonkit.Json.*.
  • Deprecate the jsonkit.jsonschema and
    jsonkit-melange.jsonschema libraries, along with the
    Ppx_deriving_jsonschema_runtime, Ppx_deriving_jsonschema_runtime_classify
    and Ppx_deriving_jsonschema_runtime_primitives modules. They still exist and
    still work, as aliases for Jsonkit.Jsonschema, Jsonkit.Jsonschema.Classify
    and the primitives modules. The deprecated modules keep their old shape:
    Primitives still has its Yojson and Jsonkit submodules, and
    json_schema is still there under that name, so existing code compiles
    unchanged.