# File lib/apipie/param_description.rb, line 60
    def to_json
      if validator.is_a? Apipie::Validator::HashValidator
        {
          :name => name.to_s,
          :full_name => full_name,
          :description => desc,
          :required => required,
          :allow_nil => allow_nil,
          :validator => validator.to_s,
          :expected_type => validator.expected_type,
          :params => validator.hash_params_ordered.map(&:to_json)
        }
      else
        {
          :name => name.to_s,
          :full_name => full_name,
          :description => desc,
          :required => required,
          :allow_nil => allow_nil,
          :validator => validator.to_s,
          :expected_type => validator.expected_type
        }
      end
    end