docs/OPEN_STRUCT.md in lite-ruby-1.0.24 vs docs/OPEN_STRUCT.md in lite-ruby-1.0.25
- old
+ new
@@ -29,11 +29,11 @@
person['name'] = 'tim'
```
`attributes`
------
-Returns the key values of the assigned struct.
+Returns the key values as a hash of the assigned struct.
```ruby
person = OpenStruct.new(name: 'bob', age: 60)
person.attributes #=> { name: 'bob', age: 60 }
@@ -46,6 +46,28 @@
```ruby
person = OpenStruct.new(name: 'bob', age: 60)
person.replace(name: 'tom', age: 28)
preson.name #=> 'tom'
+```
+
+`to_hash` aka `to_h`
+------
+Returns the key values as a hash of the assigned struct.
+
+```ruby
+person = OpenStruct.new(name: 'bob', age: 60)
+
+person.to_hash #=> { table: { name: 'bob', age: 60 } }
+person.to_hash(table: false) #=> { name: 'bob', age: 60 }
+```
+
+`to_json` aka `as_json`
+------
+Returns the key values as Json of the assigned struct.
+
+```ruby
+person = OpenStruct.new(name: 'bob', age: 60)
+
+person.to_json #=> { table: { name: 'bob', age: 60 } }
+person.to_json(table: false) #=> { name: 'bob', age: 60 }
```