Home > front end >  Convert datetime object in json into java DateTime object
Convert datetime object in json into java DateTime object

Time:12-02

I have string value {"date":{"year":2021,"month":11,"day":11},"time":{"hour":10,"minute":30,"second":45,"nano":222000000}}

Is there any available function or efficient way to convert this JSON String into Java DateTime object rather than read fields one by one and build my object?

Thanks

CodePudding user response:

Create a new Java model object, using ObjectMapper convert json string to java object.

  • Related