spring-projects / spring-projects/spring-data-rest
Date fields rendered as objects with 'content' field [DATAREST-888]
@odrotbohm is already working on this.
Since Dec 31, 2020.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Rob Moore opened DATAREST-888 and commented
Previously date fields rendered as a string (eg, "2016-07-12T17:58:43.643Z") in 1.3.7. With the 1.4.0 release, they now are rendered as an object with a content field (eg, { content: "2016-07-12T17:58:43.643Z" }).
I have created an example project (modified from the Spring example project) demonstrating this behavior:
https://github.com/robmoore/gs-accessing-mongodb-data-rest
The main branch has the 1.4.0 version with a supporting test and the spring-1.3.7 branch has an example of the previous behavior with a supporting test.
It seems like the date property is being treated as a resource by mistake.
Reference URL: http://stackoverflow.com/questions/39172792/how-do-i-avoid-content-fields-in-joda-objects
Issue Links:
- DATAREST-893 Problem serializing JSR-310 types (e.g. LocalDate)
("is duplicated by")
2 votes, 5 watchers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.