Comments (3)
@co-dax thank you for your feedback! It all makes perfect sense! The serializer issues were somewhat expected by me because we switched from Newtonsoft to System.Text.Json, so yeah, null values :). And I only made it serialize using lower case. Expecting that some people might want to change serialization rules or go back to Newtonsoft, I added a way to switch the serializer. So it should be all covered. And yeah it's v4.x.x, it's supposed to break things lol. Anyways.. I'll keep this question open for a little to see if anyone else has something to say about the matter.
from net-core-push-notifications.
Good question. You can pass a different serializer into the senders. Just override it here:
The motivation behind having it camel case is that firebase and apple expects lower case fields so it's easier to just have everything converted to lower case..
More input on this is appreciated
from net-core-push-notifications.
Yeah, it makes sense making everything uniform with regards to letter casing now it is only question if that outweights the fact that one is not getting at the device what he sends from the backend meaning if someone sends PascalCase then he might have a good reason for that. For example I am using C# and Angular and I have a plugin that is automatically creating all TypeScript files from the frontend based on the entities from the backend so for the for the message.data object I use a class with PascalCase properties and on the frontend I have (automatically generated as I mentioned above) TypeScript interface with the identic PascalCase properties but as it is I am getting camelCase propeperties.
It is not a big deal though.
As for passing the serializer, yes this a viable option and by the way I already noticed we can pass a serialier when I was getting an error when some of the payload fields were null (I think it was in iOS context) so I was trying to find a way to exclude properties with "null" values completely from serialization as FCM was reporting errors if I send an object that has a property value "null" so in that context I noticed we can pass a custom serializer...thus what I have on my mind is to create a wrapper or a proxy method/class to this library that would alway send payloads to FCM by using a custom serializer that has been setup so that it excludes from serialization propertis that have NULL values. I hope I am clear
from net-core-push-notifications.
Related Issues (20)
- FCM for android vibration does not work when app is closed HOT 1
- How to send a message to many device? HOT 5
- Push icon HOT 3
- Additional functionality HOT 1
- Non-hardcoded FCM Url HOT 3
- How can distinguish between fem tokens
- Distinguish between fcm tokens HOT 1
- Only HTTP/1.0 and HTTP/1.1 version requests are currently supported HOT 1
- Version 3.1.1 & 3.1.0 - ApnSender Fails With Serialization Error (.Net Core 6.0.7) HOT 3
- ApnsResponse from ApnSender.Send has IsSuccess = true, but I never receive notification? HOT 1
- Cancel a notification HOT 1
- Support for System.Text.JSON HOT 5
- Migrate from legacy HTTP to HTTP v1 HOT 1
- ApnSender.Send throws an Exception when Bad DeviceId is provided. HOT 4
- Firebase Error Throws Exception HOT 2
- Usage clarification HOT 2
- For Anyone Who Has Issues with Azure Service & Firebase (Cryptography) - See this... HOT 1
- Exception when sending notifications to iOS devices HOT 1
- work with apple wallet passbook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from net-core-push-notifications.