class LittleGhost::DataMap

DataMap holds JSON-compatible application data with indifferent key access. It stores every key as a String while accepting String and Symbol keys for lookup and mutation, including in nested maps.

state = DataMap.new(plan: {status: "active"})
state.dig("plan", :status) # => "active"
state.to_h                  # => {"plan" => {"status" => "active"}}

State and metadata exposed by Sessions and RunContexts use DataMap so Ruby code can use either key form while session stores keep one portable shape. Values are limited to JSON primitives, Arrays, and mappings. A mapping that supplies both a String and Symbol form of the same key is ambiguous and raises ArgumentError.