You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there really a need to have a dependency on the JSON.Net library anymore now that developers are responsible for creating their own message payloads?
Currently for GCM and Apns:
The Data and Payload properties respectively expect a JObject. This creates a hard dependency on the JSON.Net library.
I firmly believe it should be up to the developers to create a proper payload and that it is their responsibility to serialize the JSON correctly. As such, the Notification classes should just take a string object instead of a JObect.
Benefits of this:
Removing hard dependencies on external libs. Reduces version conflicts, binary size, etc.
Allows developers to make use of their own serializers like ServiceStack or Jil (or JSON.Net if they so chose)
The text was updated successfully, but these errors were encountered:
Yeah i've been giving this some thought. To be honest the only real reason it was included in 3.x+ was in case the fluent helper methods made it back in, but they have not, and will not, so I think your proposal makes sense.
If anything, eventually another package will be made to expose some helpers for building notification payloads, and that helper package may be more opinionated on the use of a serializer.
What version of PushSharp are you using?
4.x
Describe your issue:
Is there really a need to have a dependency on the JSON.Net library anymore now that developers are responsible for creating their own message payloads?
Currently for GCM and Apns:
![1](https://cloud.githubusercontent.com/assets/2852839/14012598/62fe0c8c-f1af-11e5-9bbb-71c2cfefd3af.png)
The Data and Payload properties respectively expect a JObject. This creates a hard dependency on the JSON.Net library.
I firmly believe it should be up to the developers to create a proper payload and that it is their responsibility to serialize the JSON correctly. As such, the Notification classes should just take a string object instead of a JObect.
Benefits of this:
The text was updated successfully, but these errors were encountered: