JSON and Nullable elements: Difference between revisions

m
no edit summary
m (removed system integration category, page doesn't belong there.)
mNo edit summary
Line 2: Line 2:
Using DataFlex it is very convenient to fill up your JSON data from a struct when using the [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cJsonObject.htm cJSONOjbect] class. See for example our [[Create JSON from struct]] article.
Using DataFlex it is very convenient to fill up your JSON data from a struct when using the [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cJsonObject.htm cJSONOjbect] class. See for example our [[Create JSON from struct]] article.


Quite often that JSON data is then send to a REST service and depending on that service they might not want to receive all the elements in your JSON in order to work correctly.
Quite often that [[JSON]] data is then send to a [[REST]] service and depending on that service they might not want to receive all the elements in your JSON in order to work correctly.


This has been debated before in the forum (1) a few times and currently the official way to do so is by traversing the JSON data structure and then removing the members that the other side does not want to receive using the [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cJsonObject-Procedure-RemoveMember.htm RemoveMember] method.
This has been debated before in the forum (1) a few times and currently the official way to do so is by traversing the JSON data structure and then removing the members that the other side does not want to receive using the [https://docs.dataaccess.com/dataflexhelp/mergedProjects/VDFClassRef/cJsonObject-Procedure-RemoveMember.htm RemoveMember] method.