if (Dr. TABLE.COLUMNS[J]. datatype.tostring () = = "System.DateTime") { if (dr[dr. TABLE.COLUMNS[J]. Columnname.tostring ()]! = DBNull.Value) { result + = Adddoubleyh (Convert.todatetime (DR[DR. TABLE.COLUMNS[J]. Columnname.tostring ()]). ToString ("Yyyy-mm-dd HH:mm:ss")); Result + = Jsonconvert.serializeobject (dr[dr. TABLE.COLUMNS[J]. Columnname.tostring ()]);} }
Result_memo ":" RuntimeException:com.fasterxml.jackson.databind.exc.InvalidFormatException:Can not construct Instance of java.util.Date from String value ' 2017-07-19 08:08:08 ': Not a valid representation (error:failed to parse Dat E value ' 2017-07-19 08:08:08 ': Can not parse date \ "2017-07-19 08:08:08\": not compatible with any of the standard forms (\ "yy Yy-mm-dd ' T ' HH:mm:ss. Sssz\ ", \" Yyyy-mm-dd ' T ' HH:mm:ss. SSS ' Z ' \ ", \" EEE, dd MMM yyyy HH:mm:ss zzz\ ", \" yyyy-mm-dd\ "))
Workaround:
The C # side uses the following code when Java can trade successfully, but the received datetime data differs from the C # End by 8 hours
Result + = Jsonconvert.serializeobject (dr[dr. TABLE.COLUMNS[J]. Columnname.tostring ()]);
Subsequently, the Java side made a modification adjustment, using ToString ("") to do the trade
JSON format docking Process essay