validateFunctionSignaturesJSON — Validate the JSON syntax of function-signature metadata text.
validateFunctionSignaturesJSON(S) accepts text containing JSON and throws if any payload is not syntactically valid JSON. This JSON-payload signature is a RunMat language extension; the compatibility target's filename-based and no-input forms are not yet implemented.
Syntax
mustBe*(A, ...)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
A | Any | Yes | — | Value to validate. |
B | Any | Variadic | — | Additional validator-specific argument. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:validators:ValidationFailed | A value does not satisfy the requested validator. | argument validation failed |
RunMat:validators:InvalidArgument | A validator receives an unsupported argument count or argument type. | invalid argument validation input |
RunMat:validators:ProviderOwnershipMismatch | A resident value has no exact owning provider. | argument validation: no acceleration provider owns the input |
RunMat:validators:ProviderPayloadMismatch | A resident value carries contradictory physical class metadata. | argument validation: resident input has contradictory physical class metadata |
How validateFunctionSignaturesJSON works
- Accepts string scalars/arrays, character row vectors, and compatible cell arrays of text.
- Parses each text payload as JSON and throws a structured RunMat error on syntax errors.
- Returns no user-facing value when validation passes and suppresses automatic output.
- Numeric values, including native integer values, are rejected before provider or metadata access.
Example
Validate JSON syntax for signature metadata
validateFunctionSignaturesJSON("{\"functions\":[]}")Expected output:
No output when the JSON payload parses successfully.Using validateFunctionSignaturesJSON with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how validateFunctionSignaturesJSON changes the result.
Run a small validateFunctionSignaturesJSON example, explain the result, then change one input and compare the output.
FAQ
Does this validate the full MATLAB signature schema?⌄
No. RunMat currently validates JSON syntax only; full signature-schema semantic validation is not implemented.
Related Argument Validation functions
isvarname · mustBeA · mustBeColumn · mustBeFile · mustBeFinite · mustBeFloat · mustBeFolder · mustBeGreaterThan · mustBeGreaterThanOrEqual · mustBeInRange · mustBeInteger · mustBeLessThan · mustBeLessThanOrEqual · mustBeMember · mustBeNegative · mustBeNonempty · mustBeNonmissing · mustBeNonNan · mustBeNonnegative · mustBeNonpositive · mustBeNonsparse · mustBeNonzero · mustBeNonzeroLengthText · mustBeNumeric · mustBeNumericOrLogical · mustBePositive · mustBeReal · mustBeScalarOrEmpty · mustBeSparse · mustBeText · mustBeTextScalar · mustBeUnderlyingType · mustBeValidVariableName · mustBeVector · namedargs2cell
Related guides
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.