yaml_mapping
Version, currently 0.1.12 versions
- 0.1.1latestApr 10, 2021
- 0.1.0not indexedJan 7, 2025
github.com/crystal-lang/yaml_mapping.cr
Provides the legacy `YAML.mapping` macro method
9 stars
10 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
yaml_mapping:
github: crystal-lang/yaml_mapping.cr
version: ~> 0.1.1Then run:
shards installshard.yml
- Crystal
>= 0.34.0, < 2.0.0- License
- MIT
- Author
- Brian J. Cardiff
Dependencies
This version declares no dependencies.
README
yaml_mapping
Provides the legacy YAML.mapping macro method.
This shard is provided as-is and considered deprecated. It won't receive feature enhancements.
Please consider using YAML::Serializable instead, the successor included in Crystal's standard library.
Installation
-
Add the dependency to your
shard.yml:dependencies: yaml_mapping: github: crystal-lang/yaml_mapping.cr -
Run
shards install
Usage
require "yaml_mapping"
class Employee
YAML.mapping(
title: String,
name: String,
)
end
employee = Employee.from_yaml("title: Manager\nname: John")
employee.title # => "Manager"
employee.name # => "John"
employee.name = "Jenny"
employee.name # => "Jenny"
Contributing
- Fork it (https://github.com/crystal-lang/yaml_mapping.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Apr 10, 2021
- Commit
fc980ef51780- Crystal
>= 0.34.0, < 2.0.0- Indexed
- yes
Dependents
Repository
github.com/crystal-lang/yaml_mapping.cr
Metadata
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 2