decode_load_config_inline Subroutine

public subroutine decode_load_config_inline(bytes, entries, n_entries, ok, code, message, dim, case_dir)

Decode {"args":{"config":{key1:v1,key2:v2,...}}}. Walks every key, resolves it against =config_schema= via =schema_lookup=, and validates the corresponding value's JSON type. On the first unknown / mistyped entry returns =ok=.false.= with the offending key carried in =message=. Bounds checking is delegated to the caller (the SET dispatch path runs =solver_session_set_*= which re-validates against schema bounds); this decoder only validates type-level shape.

Arguments

Type IntentOptional Attributes Name
integer(kind=int8), intent(in) :: bytes(:)
type(wire_entry_t), intent(out), allocatable :: entries(:)
integer, intent(out) :: n_entries
logical, intent(out) :: ok
character(len=*), intent(out) :: code
character(len=*), intent(out) :: message
integer, intent(out), optional :: dim

Problem dimension the inline config targets. Absent -> 1 (older clients, 1D-only). Controls which schema (config_schema vs config_schema_2d) the keys are validated against, so a dim=2 config with 2D-only keys decodes.

character(len=*), intent(out), optional :: case_dir

Optional case directory anchoring relative file paths (grid_file, …). Absent -> returned empty; the caller then leaves paths untouched.