Configuration Files
Stof for configuration files.
Last updated
Was this helpful?
Stof for configuration files.
Last updated
Was this helpful?
Because Stof is extremely friendly for both humans and machines, it can be a good choice for your configuration files. And because Stof works seamlessly with other formats and standards, you can be more flexible (keep using JSON, YAML, etc. if already in place).
In addition to being more user-friendly, this might be particularly helpful for:
Cloud infrastructure & deployment
Merging, diffing, or bridging environments
Organizing any additional data required for initialization/usage
Validation, governance, and control
Advantages:
Flexibility (multiple formats + portable interfaces)
Types, schemas, and structure
Functional interface for multiple host environments
Not just metadata, but metacode, attached directly to your fields & data
Keep in mind that for defining data, Stof is a superset of JSON, and valid JSON is valid Stof.
This example shows off some unique features of Stof. One could make this much cleaner and more readable (outside of docs) by separating the types, functions, or metadata and combining them as needed.
Field declarations are expressions that get evaluated when parsed.
Types and interfaces for objects, but also types and units for all other values, with conversions.
Attributes can hold any Stof value, including functions, objects, etc. (default is null).
Import and export data in other formats (create/send/unify configs in JSON, YAML, etc.).