I get "JsonException: Max allowed object depth reached while trying to export from type System.Single..." error

If you get the following error:

JsonException: Max allowed object depth reached while trying to export from type System.Single...

you are probably storing a float value in a Dictionary<string,object>

like this:

This is a side effect of the JSON writer, as it usually wants to use the largest type available in the family. In this case, you will be able to solve the issue by using a double instead of a float.