Type MethodMethodparse(_:
parse(_:warningHandler:)
Parses theme settings from JSON data.
static func parse(
_ data: Data,
warningHandler: (any ThemeParsingWarningHandler )? = nil
) throws -> ThemeSettings .RootParameters
dataThe JSON data to parse.
warningHandlerReceives warnings about unknown keys, or
nilto ignore them.
Return Value
The parsed theme settings.
Discussion
This uses the same parser and validation as the build-time theme compiler: unknown keys and feature switches are reported to the warning handler.