@Test
    public void testNumber() {
        var schema = """
                {
                    "type": "number"
                }
                """;
        var expectedGrammar = """
                decimal-part ::= [0-9]{1,16}
                integral-part ::= [0] | [1-9] [0-9]{0,15}
                root ::= ("-"? integral-part) ("." decimal-part)? ([eE] [-+]? integral-part)? space
                space ::= | " " | "\\n" [ \\t]{0,20}
                """;

        var actualGrammar = JsonSchemaToGrammar.convert(schema);
        assertEquals(expectedGrammar, actualGrammar);
    }
These tests are based on C++ unit tests from llama.cpp repository.
model-integration/src/test/java/ai/vespa/llm/clients/JsonSchemaToGrammarTest.java