Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
12
Found in
5.3.0f4
Issue ID
762807
Regression
No
JsonUtility does not serialize/deserialize DateTime formats
Repro steps:
1) Open the project and only scene in it
2) Play the scene
3) Inspect the Console - notice that no result is given in the WarningLog with serialized JSON object (see screenshot)
Reproduced in: 5.4.0b2; 5.3.1p3
No JSONUtility in previous versions
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shadows are not cast when the Light's CullingMask and the GameObject's Layer do not match
- Graphics.DrawMeshInstanced does not work when 2D Renderer and 2D Shaders are used
- SpeedTree does not move when using WindZone
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
Ardito92ITA
Sep 29, 2023 12:46
it is unacceptable that after 7 years this bug is still present.
Spip5
Dec 02, 2020 14:53
This is still an issue in Unity 2019.3
JaviTheGreat
Jul 28, 2020 00:00
This is still an issue in Unity 2019.2.19f1
jdnichollsc
Mar 12, 2018 15:47
same issue with the last stable version of Unity, 2017.3. Check the example to reproduce this issue https://github.com/proyecto26/RestClient#example-
petersvp
Jan 12, 2018 15:46
The JsonUnility cannot decode even it's own encoded value. bool variable with FromJson fails for string "true"
AmazingRuss
Jun 01, 2017 18:07
Please fix this! I spent a great deal of effort convincing the team to use JsonUtility instead of add ons, and this bug makes me look like a putz.
deadlyfingers
Nov 29, 2016 12:11
There is a workaround for this.
You can use a private string field for serialization then have a method to do the conversion:
[SerializeField]
private string createdAt;
private DateTime? _createdAt;
public DateTime? CreatedAt ()
{
if (_createdAt == null) {
_createdAt = Convert.ToDateTime (createdAt);
}
return _createdAt;
}
Olly
Aug 07, 2016 16:46
I've just started noticing the same issue. Only effects children of a parent object that also has DateTime as a type.
unity_john_doe
Jun 18, 2016 00:24
Please, please, please, get this fixed!