Sep 20, 2010 - Take a look how the date attibute is being serialized: “date”:000. Jackson uses default strategy to determine date formatting in. The quickest method of converting between JSON text and a.NET object is using the T:Newtonsoft.Json.JsonSerializer. Serializing Dates in JSON.
Track tasks and feature requests
Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprises 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
Labels
Comments
commented Feb 14, 2017
Hi, I have a question about DateTime Parser. How to parse json string with datetime formatted into java.util.Date? Here is my json: And this is my java: I use in a request using getAsParsed method.When I apply the data to the view, the getDatePost() returning null value. thanks. *) sorry for my english |
added the question label Feb 14, 2017
commented Feb 14, 2017
First of all, please update the library to latest version and use getAsObject or getAsObjectList instead of getAsParsed .There are two ways: First: Convert your datePost into String type in the model class.Second: You can customize GSON Parser according to your date format and pass it to the Fast-Android-Networking after initializing it as below: |
commented Feb 14, 2017
Thank you @amitshekhariitbhu for the quick reply. and thank you, this is works. I like the second way because its only once for the global and I don't want any changes in my model. |
closed this Mar 19, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment