Class StiJson

Hierarchy

  • StiJson

Index

Constructors

constructor

  • new StiJson(name?: string, value?: any, isProperty?: boolean, isRaw?: boolean): StiJson
  • Parameters

    • Default value name: string = null
    • Default value value: any = null
    • Default value isProperty: boolean = false
    • Default value isRaw: boolean = false

    Returns StiJson

Properties

name

name: string

value

value: any

Static prettyPrint

prettyPrint: boolean = true

Accessors

count

  • get count(): number
  • Returns number

Methods

addPropertyBool

  • addPropertyBool(propertyName: string, value: boolean, defaultValue?: boolean, ignoreDefaultValues?: boolean): void
  • Parameters

    • propertyName: string
    • value: boolean
    • Default value defaultValue: boolean = false
    • Default value ignoreDefaultValues: boolean = false

    Returns void

addPropertyDateTime

  • addPropertyDateTime(propertyName: string, value: DateTime): void
  • Parameters

    Returns void

addPropertyEnum

  • addPropertyEnum(propertyName: string, enumType: any, value: any, defaultValue?: any): void
  • Parameters

    • propertyName: string
    • enumType: any
    • value: any
    • Default value defaultValue: any = null

    Returns void

addPropertyIdent

  • addPropertyIdent(propertyName: string, value: string): void
  • Parameters

    • propertyName: string
    • value: string

    Returns void

addPropertyJObject

  • addPropertyJObject(propertyName: string, value: StiJson): void
  • Parameters

    • propertyName: string
    • value: StiJson

    Returns void

addPropertyJObjectArray

  • addPropertyJObjectArray(propertyName: string, values: StiJson[]): void
  • Parameters

    • propertyName: string
    • values: StiJson[]

    Returns void

addPropertyNumber

  • addPropertyNumber(propertyName: string, value: number, defaultValue?: number): void
  • Parameters

    • propertyName: string
    • value: number
    • Default value defaultValue: number = 0

    Returns void

addPropertyNumberNoDefaultValue

  • addPropertyNumberNoDefaultValue(propertyName: string, value: number): void
  • Parameters

    • propertyName: string
    • value: number

    Returns void

addPropertyPoint

  • addPropertyPoint(propertyName: string, point: Point): void
  • Parameters

    • propertyName: string
    • point: Point

    Returns void

addPropertyString

  • addPropertyString(propertyName: string, value: string, defaultValue?: string): void
  • Parameters

    • propertyName: string
    • value: string
    • Optional defaultValue: string

    Returns void

addPropertyStringNullOrEmpty

  • addPropertyStringNullOrEmpty(propertyName: string, value: string): void
  • Parameters

    • propertyName: string
    • value: string

    Returns void

addRawString

  • addRawString(propertyName: string, value: string): void
  • Parameters

    • propertyName: string
    • value: string

    Returns void

deserialize

  • deserialize(text: any): void
  • Parameters

    • text: any

    Returns void

properties

removeProperty

  • removeProperty(propertyName: string): void
  • Parameters

    • propertyName: string

    Returns void

serialize

  • serialize(indent?: number): string
  • Parameters

    • Default value indent: number = 0

    Returns string

toString

  • toString(): string
  • Returns string

Static dateToJsonDate

  • dateToJsonDate(date: DateTime): string
  • Parameters

    Returns string

Static jsonDateFormatToDate

  • jsonDateFormatToDate(jsonDate: string): DateTime
  • Parameters

    • jsonDate: string

    Returns DateTime

Generated using TypeDoc