bytefish / FcmSharp

Firebase Cloud Messaging (FCM) with .NET
MIT License
6 stars 7 forks source link

In Message class change Dictionary<string, string> to Dictionary<string, object> to allow nested objects #11

Closed yar1k0v closed 6 years ago

yar1k0v commented 6 years ago

Right now it's not convenient to send a message with nested objects.

bytefish commented 6 years ago

The Protocol mandates, that data are Key Value Pairs of Strings, please see:

It is also, what's implemented in the official Java Admin SDK:

If an additional abstraction layer is needed, you could easily turn an object into a Dictionary with Newtonsoft JSON and then pass it into the message.