argdecode

package
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package argdecode converts JSON arguments to AILANG eval.Value types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJSON

func DecodeJSON(jsonStr string, expectedType types.Type) (eval.Value, error)

DecodeJSON converts a JSON string to an eval.Value based on the expected type Supports: null→(), number→int, string, bool, array→list, object→record Constraint: Only handles simple, non-polymorphic types for v0.1.0

Types

type DecodeError

type DecodeError struct {
	Expected string // Expected type (pretty-printed)
	Got      string // JSON value received
	Reason   string // Human-readable reason
}

DecodeError represents an argument decoding error

func (*DecodeError) Error

func (e *DecodeError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL