validateFunctionSignaturesJSON — Validate that a MATLAB function-signature metadata payload is syntactically valid JSON.
validateFunctionSignaturesJSON(S) accepts RunMat text values containing JSON and throws if any payload is not syntactically valid JSON. It does not yet implement full MATLAB signature-schema semantic validation.
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 |
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.
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 for compatibility; 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
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.