Skip to main content

Module json

Module json 

Source
Expand description

Generic JSON/string parsing utilities shared across the platform.

These are provider- and package-agnostic helpers over serde_json::Value. They live in the leaf whipplescript-core crate so both the CLI surfaces and the wasm-kernel-hostable package registry validators (which cannot call back into the CLI binary) can reach them.

Functions§

optional_json_string
Read an optional non-empty string field.
optional_json_string_any
Read the first present non-empty string among fields.
optional_json_string_array
Read an optional string array, dropping empty entries.
quoted_platform_values
Join values as a comma-separated list of backtick-quoted tokens, for “expected one of …” diagnostics.
require_json_array_field
Read a required array field by reference, or an actionable error.
required_json_string
Read a required non-empty string field, or an actionable error naming owner and field.