class Gruf::Serializers::Errors::Json

Serializes the error via JSON for transport

Public Instance Methods

deserialize() click to toggle source

@return [Hash] A hash deserialized from the inputted JSON

# File lib/gruf/serializers/errors/json.rb, line 37
def deserialize
  JSON.parse(@error)
end
serialize() click to toggle source

@return [String] The serialized JSON string

# File lib/gruf/serializers/errors/json.rb, line 30
def serialize
  @error.to_h.to_json
end