Expand description
Properties namespace implementation for handling key-value configuration data.
This module provides the Properties
struct which wraps a serde_json::Value
and
provides methods for working with properties-style configuration data. Properties
format is commonly used for application configuration where data is stored as
simple key-value pairs.
§Usage
The Properties
struct is typically created automatically by the namespace detection
system when a namespace name has no file extension (defaulting to properties format),
but can also be created directly from any serde_json::Value
.
§Supported Data Types
The properties implementation supports automatic parsing of the following types:
String
- Text valuesi64
- Integer valuesf64
- Floating-point valuesbool
- Boolean values
§Examples
ⓘ
use serde_json::json;
use apollo_client::namespace::properties::Properties;
let props_data = json!({
"app.name": "MyApplication",
"app.version": "1.0.0",
"app.port": "8080",
"app.debug": "true"
});
let properties = Properties::from(props_data);
Structs§
- Properties
- A wrapper around
serde_json::Value
for properties-style configuration data.