Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Modified backend and frontend for handling grouping of datasets #460
base: master
Are you sure you want to change the base?
Modified backend and frontend for handling grouping of datasets #460
Changes from 2 commits
d550337
8a0fe16
6130c24
0431bd9
6aac61e
66014cf
4e15ef8
05c8ff9
acd333a
4ac985c
4aa50ab
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a Set or List of adapter configurations and serializing them as JSON would be better, since it allows us to add more details about the datasets later on.
I sent you a link about how the Jackson serialization (used by the Spring framework) works. You can also try to simply return the set of configuration objects as it is since the serialization is typically not hard for most Java objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a solution that would work 👍
However, the current implementation handles something that the Spring framework can already do for you. I am afraid that I have described the goal in an ambiguous way, so let me try to explain what I would suggest.
The method should return
Map<String, List<DatasetCofiguration>>
and the Spring framework should apply it's "magic" to transform it into JSON 🪄Of course, Spring cannot do magic things, so we still have to provide the serialization 😉
However, it is sufficient if we tell Spring that there is exactly one class that implements the serialization and Spring can simply make use of it whenever it is necessary. You can do that with the method that is shown under point 3.2 in https://www.baeldung.com/spring-boot-customize-jackson-objectmapper (if I am not mistaken, I didn't read the whole text 😅 so let me know if you encounter problems). This method should go into our
RootConfig
.