Skip to content

Use JSON instead HAL in 3.6 version for projection #2132

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

Open
iatomatt opened this issue Apr 13, 2022 · 1 comment
Open

Use JSON instead HAL in 3.6 version for projection #2132

iatomatt opened this issue Apr 13, 2022 · 1 comment
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@iatomatt
Copy link

Hello. My problem is that I got response in HAL format for projections (Entity's are in JSON) using spring boot + data-rest.
My project configuration include next params:

spring: data: rest: default-media-type: application/json hateoas: use-hal-as-default-json-media-type: false

I've got answer from endpoint in format like:

{ "dateIn": "2021-10-25T10:43:32.021", "stopList": "1", "devicesInfo": [ { "id": 2, "ipAddress": "192.167.1.1", "countryCode": "643", "deviceType": "web", "deviceName": "Dell ", "deviceModel": "G5 3500" } ], "links": [ { "rel": "self", "href": "http://localhost/api/afNonPayments/1" }, { "rel": "afNonPayment", "href": "http://localhost/api/afNonPayments/1{?projection}" } ] }
The devicesInfo section is the simple entity, and there is no links attribute.
But the full object is projection, and its JSON representation contains links section, which I want to remove. Is any way to make it?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 13, 2022
@tmc9031
Copy link

tmc9031 commented May 29, 2022

I also want to disable HAL format simply !!!
Please maintainer provide one selection for plain JSON, thanks :)
But look like NOT clear way to close HAL ??? spring-boot#26814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

4 participants