JSON becomes Slint values as you would expect: booleans for bool,
finite numbers for int and float, strings for string, arrays for
models ([T]), objects for structs. Struct field names are passed
unchanged, so write them as the Slint file spells them; a name with _
is refused (Slint treats _ and - as the same, so use camelCase or
kebab-case).
A Text or TextList goes where the Slint type is string, at
any depth: the player shows it translated with the plugin's catalog, so a
[string] model (a ComboBox) can mix words and data. The limits below count
it as the string it becomes.
A MarkdownRef goes where the Slint type is [MarkdownBlock]: the
whole value, or a field at any depth. An ImageRef goes where the
Slint type is image: the whole value, or a field at any depth. The images
nested in the values of one view (a window, panel or settings page) may show
at most 32 MB of decoded pixels together (IMAGE_LIMITS.viewBytes in
@vestra-player/sdk/runtime): a write that would pass it is refused with
limit; use ImageOptions.maxSide for small pictures such as logos
and thumbnails.
Limits per value (UI_VALUE_LIMITS in @vestra-player/sdk/testing): nesting
depth 8, 1,048,576 values in total (every array, object, string, number,
boolean and null counts, the value itself included; a document or an image is
one), 100,000 rows per array, 64 KiB per string or field name and 32 MiB of
text in total, field names and the text of its Markdown documents included
(256 KB per document). A list of rows with 13 fields is 14 values per row, so
50,000 such rows fit. An array property larger than one 1 MiB request is sent
in parts (a player that takes row patches); only the top-level array is
split, so any other value, and each row, must fit in one request (a row of
more than 512 KiB is refused with limit). A value over a limit is refused
with code limit and the property keeps what it showed (see
View.set); TestHost refuses it the same way.
Bind a whole list and draw it with a Slint ListView, which builds only
the rows on screen; the SDK sends what changed (row patches).
The value of one Slint property: JSON with Markdown documents and images at any depth (PropData).