Ids parameter is not transferred correctly via data-ids



I cloned MiniProfiler repository (v2.0.4 - last commit was cf359967ec7b4f6ba14dc2251719fe451dc2663f). I compiled it, and added to my project. And then I noticed some of the profiler information is missing in the result view. So I inspected a little and found out that after 2.0.2 you have changed the way to transfer timing data ids. Now you use a script tag, and transfer ids in an attribute called data-ids in json format. There are two problems with that

1- encoding a guid array to json produces an html like this

<script data-ids="["12345678-1234-...", "12345678-1234-..."]"></script>

and when you try to read value of data-ids attribute value is “[” and guid value becomes another attribute.

2- javascript part that read that attribute expects data to be in a single string separated by comma. I had to change line

ids = ids.toJson()


ids = string.Join(",", ids.Select(id => id.ToString()).ToArray()),

it is quick and dirty and but works.