jsonSchemaToGbnf function

String jsonSchemaToGbnf({
  1. required String schemaJson,
})

Convert a JSON Schema (as a JSON string) into a GBNF grammar for `FfiGenerationConfig::grammar`.

Fails (as a String error, per this crate's FRB convention) when the schema is not valid JSON or uses a construct outside the supported subset.

Implementation

String jsonSchemaToGbnf({required String schemaJson}) =>
    XybridRustLib.instance.api
        .crateApiModelJsonSchemaToGbnf(schemaJson: schemaJson);