use stdlib json module whenever possible to make it work with django 1.5+