Skip to main content

Module serde_helpers

Module serde_helpers 

Source
Expand description

Serde helper utilities

Functionsยง

deserialize_maybe_quoted
Deserializes a value that can be represented as either its native type or a quoted string. This is particularly useful for LLM tool calls which sometimes quote numeric arguments.
deserialize_opt_maybe_quoted
Deserializes an optional value that can be represented as either its native type or a quoted string.
json_to_string_pretty
Render a serde_json::Value as pretty-printed JSON, falling back to its Display impl when the value cannot be serialized.