Update tests to do deep comparisons of deserialized data

String comparisons of serialized data were unreliable due to the fact
that JSON maps are not ordered.