wwJsonSerializer.DefaultEmptyDate

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 :}.

o.wwJsonSerializer.DefaultEmptyDate

Example

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, 1996-2024 • Updated: 02/14/24
Comment or report problem with topic