Better json dumping.
Updated docs.