for the moment I have a dictionary with the keys names and the values id that belong to those names. When I want to search the id belonging to a particular name, I have to walk over the whole structure, so this method has a bad performance.
I was wondering if a json-structure would provide a more performant solution? So my question is: is the retrieving of the value of an attribute in json quick? I am talking about at least 250 different attributes in a single json.
If not, what would be the best way to solve this performance-issue?
250 different elements is very unlikely to cause performance issues. Don’t worry about it. If you really care, you can put the contents of your structure into a hash table, which will give you really fast look up performance. I would recommend that you don’t worry about this unless you can prove (with a profiler) that this look up is a performance problem.