Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface JsonFormatString

Decorator specific options for JsonFormat with JsonFormatBaseOptions.shape value JsonFormatShape.STRING.

IMPORTANT NOTE: When formatting a Date, a date library needs to be set using the dateLibrary option. Date libraries supported: https://github.com/moment/moment, https://github.com/iamkun/dayjs/.

Hierarchy

Index

Properties

Optional contextGroups

contextGroups: string[]

Property that defines whether this decorator is part of a context group or multiple groups.

Optional dateLibrary

dateLibrary: any

To be able to use JsonFormat on class properties of type Date with JsonFormatShape.STRING, a date library needs to be set. Date libraries supported: https://github.com/moment/moment, https://github.com/iamkun/dayjs/.

Optional enabled

enabled: boolean

Property that defines whether this decorator is active or not.

default

true

Optional locale

locale: string

Locale to be used to format a Date during serialization.

default

'en'

Optional pattern

pattern: string

Pattern to be used to format a Date during serialization.

Optional radix

radix: number

Radix to be used to format an integer Number during serialization and using parseInt().

shape

shape: STRING

Value that indicates that (JSON) String type should be used.

Optional timezone

timezone: string

Timezone to be used to format a Date during serialization.

Optional toExponential

toExponential: number

An integer specifying the number of digits after the decimal point to be used to format an integer Number during serialization and using toExponential().

Optional toFixed

toFixed: number

The number of digits to appear after the decimal point to be used to format a Number during serialization and using toFixed().

Optional toPrecision

toPrecision: number

An integer specifying the number of significant digits to be used to format a Number during serialization and using toPrecision().

Generated using TypeDoc