refactored to generate JSON instead of plist for iOS