Added JSON support for user preferences.