Documentation
¶
Overview ¶
Package json provides the JSON configuration decoder for CONGA applications.
Register Decode with conga.App.RegisterDecoder to enable JSON configuration support:
app.RegisterDecoder(".json", json.Decode)
Key Mapping ¶
Top-level JSON keys match flag names using kebab-case, snake_case, or camelCase:
{
"port": 8080,
"database_url": "postgres://localhost/db",
"maxRetries": 5
}
Strictness ¶
Decoding follows encoding/json/v2 semantics and rejects inputs that RFC 8259 leaves ambiguous: duplicate object member names and invalid UTF-8 in strings are errors rather than silently accepted. Reported errors carry the byte offset and JSON pointer of the offending value. Syntax errors, trailing content after the first JSON document, and non-object top-level values wrap ErrParse. A JSON null document decodes to an empty map.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrParse indicates a syntax or parsing error in JSON configuration. ErrParse = errors.New("json parse error") )
Functions ¶
Types ¶
This section is empty.