Module: Que::Utils::JSONSerialization
- Included in:
- Que
- Defined in:
- lib/que/utils/json_serialization.rb
Instance Method Summary collapse
Instance Method Details
#deserialize_json(json) ⇒ Object
15 16 17 18 |
# File 'lib/que/utils/json_serialization.rb', line 15 def deserialize_json(json) # Allowing `create_additions` would be a security vulnerability. JSON.parse(json, symbolize_names: true, create_additions: false) end |
#serialize_json(object) ⇒ Object
11 12 13 |
# File 'lib/que/utils/json_serialization.rb', line 11 def serialize_json(object) JSON.dump(object) end |