Documentation
¶
Index ¶
- func RewrapValue(v interface{}) interface{}
- func UnmarshalJSONValue(data []byte) (interface{}, error)
- type KVPair
- type Map
- func (m *Map) Delete(key string)
- func (m *Map) Each(fn func(interface{}))
- func (m *Map) Entries() []KVPair
- func (m *Map) First() interface{}
- func (m *Map) Get(key string) interface{}
- func (m *Map) GetValue(key string) (interface{}, bool)
- func (m *Map) Has(key string) bool
- func (m *Map) Keys() []string
- func (m *Map) Len() int
- func (m *Map) LiquidMethodMissing(key string) interface{}
- func (m *Map) MarshalJSON() ([]byte, error)
- func (m *Map) Set(key string, value interface{})
- func (m *Map) Size() int
- func (m *Map) ToGoMap() map[string]interface{}
- func (m *Map) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RewrapValue ¶
func RewrapValue(v interface{}) interface{}
RewrapValue recursively converts map[string]interface{} values to *Map, restoring Each()/LiquidMethodMissing() after JSON round-trip through the plugin serialization boundary.
func UnmarshalJSONValue ¶
UnmarshalJSONValue parses a top-level JSON value, using *Map for objects. For arrays and scalars, returns the standard Go types.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (*Map) Each ¶
func (m *Map) Each(fn func(interface{}))
Each yields [key, value] pairs in insertion order. Implements the iteration interface expected by liquidgo's SliceCollection.
func (*Map) First ¶
func (m *Map) First() interface{}
First returns the first [key, value] pair (accessed as .first in Liquid).
func (*Map) LiquidMethodMissing ¶
LiquidMethodMissing enables property access from Liquid templates. {{ site.data.team.alice }} calls LiquidMethodMissing("alice").
func (*Map) MarshalJSON ¶
func (*Map) ToGoMap ¶
ToGoMap converts to a standard map[string]interface{}, losing key order. Nested *Map values are recursively converted.