-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to reconfigure the json mapper? #48
Comments
Can you provide a test that demonstrates the behavior you'd like? That'll be the fastest way for me to wrap my head around this. A pull request would be great, even if the implementation is speculative. |
It would be lovely if you can take a look at my proposed changes in #51. This will allow you to use a custom object mapper of your choice. It was primarily designed to fix #45, but it might also help you. However, I really am not sure what will work for erasing field values. I haven't paid attention to that recently. |
It seems like #51 would solve our issue, yes! Perfect. Any plans when you are going to release 0.0.38? |
0.0.38 has been released. Please check it out and let me know if things are working as expected. |
Hi,
The following line in the
ForceApi
class is causing us some trouble:jsonMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
force-rest-api/src/main/java/com/force/api/ForceApi.java
Line 50 in 8b64d0f
The problem we are having is that when an attribute currently has a value, but then that value was cleared, we receive that new value as "null" from our source system, but it never reaches Salesforce because this null value is ignored by the JSON serialization in ForceApi.
Was there a specific reason why this is the non-changeable default? Would it maybe be a good extension to make this configurable?
We'd be happy to create a pull request for this, were just wondering what the best way might be. Would it be too granular to introduce a boolean option in the configuration that says
includeNonNull
, with default valuetrue
? (In that case the jsonMapper couldn't be a static field anymore, would have to be an instance field that gets initialised in the constructor)Thanks!
The text was updated successfully, but these errors were encountered: