Allows you to explicitly set a predefined date value for empty FoxPro dates when serializing, since JSON doesn't have the notion of the empty date. This is the date value that the serializer applies to FoxPro empty dates when serializing into JSON.

The default date uses JavaScript's default zero date which is a date of {^1970-1-1 :} which was the previous value set by default and couldn't be overridden.



loSer = CREATEOBJECT("wwJsonSerializer")
*** 1970-01-01T10:00:00Z
? loSer.Serialize({})

loSer.DefaultEmptyDate = {^2000-1-1 :}
*** 2000-01-01T10:00:00Z
? loSer.Serialize({})

See also:

Class wwJsonSerializer

© West Wind Technologies, 2023 • Updated: 01/28/22
Comment or report problem with topic