Skip to content

configurable wrapping of single links/resources #115

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

Closed
wants to merge 1 commit into from

Conversation

Laures
Copy link
Contributor

@Laures Laures commented Nov 1, 2013

Hal defines the json-array around single links or embedded resources as optional. currently the hal implementation will never wrap single entities. now this can be activated.

Details:

  • wrapping is off by default
  • can be configured on the handler instantiator

wrapping is off by default
can be configured on handler instantiator
@odrotbohm
Copy link
Member

This looks very useful in general but I have a few comments regarding the implementation:

  • I think we can drop the changes for the Jackson 1.x implementation. I've already deprecated it and it is not likely to survive the 0.10 (next but one) release.
  • The current changes don't apply cleanly on master anymore (probably due to a few changes in the very same part of the codebase). Would you mind rebasing it onto current master?
  • The top level place this is exposed seems to be the HalHandlerInstantiator. While this makes great test cases, how would a user activate this in a real world application? How do you think this should be exposed in the application configuration.

@ghost ghost assigned odrotbohm Jan 2, 2014
@Laures
Copy link
Contributor Author

Laures commented Jan 9, 2014

getting rid of jackson 1 sound great. i believe the best way would be to add properties to the hal module that is installed into jackson. unfortunately i don't think that is possible because of the way annotation based serializers are created.

So as a compromise the configuration is exposed on the level of the serializers so they can be configured and provided to jackson with this config. the methods on the HalHandlerInstantiator is merely glue code because afaik you will always need a HandlerInstantiator to use any of these options.

if that is ok i will apply the changes aggain and create a new pull request.

@gregturn
Copy link
Contributor

Superceded by #288.

@gregturn gregturn closed this Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants