-
Notifications
You must be signed in to change notification settings - Fork 15
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
option to ignore initial values? #71
Comments
Should not be difficult to implement. |
also, I'm considering extending the custom mapping class/interface to also be able to handle values, as I'd like to keep some initial values |
perhaps something like adding this method to the custom mapping interface methods to_json_skip_value
importing
io_type type ref to cl_abap_typedescr
is_node type ty_node,
returning
value(rv_skip) type abap_bool. if it returns |
Separated the last comment into an issue #72 (good idea by the way !) Looking into
UPD: Otherwise we need a separate flag for deep skipping .. or just implement #72 as the only way to do it |
having ignore_empty on by default, might be a breaking change, not for ABAP, but if there are consumers of the json in languages that respect undefined but anyhow, I'm all for breaking stuff #keepTheCoreMoving |
In the meantime I think it is "just implement #72 as the only way to do it"... (in progress) |
yea, so close this issue? |
Not yet, let's keep it for clarity, the task is a bit more difficult than I thought |
@larshp reimagining the feature ... what is the final purpose of the feature?
Or is it a serialized json without certain nodes ?
I believe it is the 2nd The first feature is adding a lot of complexity when setting values. While the 2nd is separatable in an independent logic
Does it make sense ? Why complexity - because of deep nature of json. E.g. the above example adds '/filtered/node' where filtered does not exit yet. So ! Both '/filtered/node' and '/filtered' must be skipped. Or if '/filtered' already exist then it should stay. Not only will it make |
The filter was implemented, can this be closed ? |
I have the following code,
it creates the following json,
I'd like to ignore initial fields, ie. expected outcome is
any suggestions/thoughts on implementing this?
The text was updated successfully, but these errors were encountered: