1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! JSON decoding for a state field whose concrete payload is [`String`].
//!
//! [`JsonStringDecoder`] converts exactly one raw JSON field value into an owned
//! UTF-8 string. The series reader remains responsible for finding the field
//! by key, selecting this decoder, and inserting the returned string into the
//! matching state slot.
//!
//! The expected representation is a JSON string, including its surrounding
//! quotation marks. Standard JSON escapes are decoded by Serde JSON, so
//! `"line\nvalue"` becomes a string containing an actual newline. Empty strings
//! and all valid Unicode content are accepted. JSON `null`, numbers, booleans,
//! arrays, and objects are rejected rather than converted implicitly.
//!
//! This decoder deliberately performs no trimming, case conversion,
//! normalization, non-empty validation, key lookup, record parsing, state
//! mutation, or filesystem access. Applications requiring a constrained or
//! transformed string should register a custom decoder for that key.
use JsonPayloadDecoder;
/// Stateless default decoder for payloads stored as [`String`].
///
/// The unit struct is zero-sized and may be copied freely while configuring
/// decoder registries. Every registry entry still binds it to exactly one key
/// and to the concrete [`String`] output type.
;