-
Notifications
You must be signed in to change notification settings - Fork 330
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
WebApi 5: DefaultBodyModelValidator throws StackOverflowException when validating model with LocalTime #249
Comments
Original comment by |
Original comment by |
Original comment by |
Original comment by
|
Original comment by |
Original comment by
|
Original comment by |
I am running into this issue as well. In the model class that I'm trying to deserialize I have a property of type OffsetDateTime. OffsetDateTime has a property called LocalDateTime of type LocalDateTime. The LocalDateTime class has a property called TimeOfDay of type LocalTime. The LocalTime class has a property named TimeOfDay property of type LocalTime. So it tries to validate OffsetDateTime -> LocalDateTime -> TimeOfDay -> LocalDateTime -> TimeOfDay -> LocalDateTime and so on. I think it is this design that's causing infinite recursion while trying to validate a model binding. I would imagine the same exact problem would exist with the regular DateTime class (DateTime -> Date -> DateTime) but there is probably some custom code under the covers somewhere in Web API to handle that scenario. I'm not sure the best way to handle this or work around it. |
Original issue reported on code.google.com by
germanft...@gmail.com
on 29 Oct 2013 at 11:20The text was updated successfully, but these errors were encountered: