YAML
Flow Style
Inline JSON-like sequences and mappings.
By EZ4Code Team
flowinline
Code
# Flow style (inline)
fruits: [apple, banana, cherry]
person: {name: Alice, age: 30}
nested: {a: [1, 2], b: {c: 3}}
# Mixed flow and block
config:
server: {host: localhost, port: 8080}
features: [auth, logging, cache]Explanation
Flow style uses square brackets for sequences and curly braces for mappings, mirroring JSON syntax for compact inline data. It can be mixed freely with block style so large structures stay readable while short tuples stay on one line. Flow collections do not allow comments inside them.