rs/pushd — pull request #29 by jvah (2013-05-27 20:32:52+00:00)
Title: Support raw notifications in MPNS as JSON.

NOTE! This affects existing clients if they have set ignore_message.

Earlier the MPNS functionality was as follows:
1. Send toast notification only if ignore_message is NOT true
2. Send tile notification only if ignore_message is NOT true
3. Send raw notification only if ignore_message is true, send only data.payload as string

This patch changes the functionality to the following:
1. Send toast notification only if ignore_message is NOT true
2. Send tile notification always, do not care about ignore_message
3. Send raw notification always as JSON, containing all data. values
4. If ignore_message is NOT true, include title and message keys in the raw JSON data

The motivation behind this change is that the toast notification is basically the original message of iOS that ignore_message was meant to filter. The tile notification is closer to the badge updating of iOS (count value is basically the same), so ignore_message shouldn't filter it out. And the raw message is basically equivalent to the whole data sent to iOS/Android.

JSON format was simply chosen, because it is the most natural format for this service. Microsoft doesn't define any data format for raw notifications, although they use XML in their example.