def to_json no_index=true
      if no_index
        to_a[0].to_json
      else
        to_a.to_json
      end
    end
Convert to json. If no_index is false then the index will NOT be included
in the JSON thus created.