def to_json(excluded_fields = [])
      hash = {}
      self.instance_variables.each do |var|
        hash[var.to_s.delete "@"] = self.instance_variable_get var unless excluded_fields.is_a?(Array) && excluded_fields.include?(var.to_s.delete "@")
      end
      JSON.pretty_generate(hash)
    end
def to_json(excluded_fields = [])
      hash = {}
      self.instance_variables.each do |var|
        hash[var.to_s.delete "@"] = self.instance_variable_get var unless excluded_fields.is_a?(Array) && excluded_fields.include?(var.to_s.delete "@")
      end
      JSON.pretty_generate(hash)
    end
Initialize object extending JSONable

 Params:
 +hash+:: Hash

 Get object in pretty json format

 Params:
 +excluded_fields+:: array of String - attributes to exclude