Home Reference Source
import JSONConvertable from '~/serializers/JSONConvertable.js'
public interface | source

JSONConvertable

A class that can be converted to json

Static Method Summary

Static Public Methods
public static

fromJSON(json: Object): T

Converts a provided object to JSON.

Method Summary

Public Methods
public

Returns a JSON string representing the objcet

Static Public Methods

public static fromJSON(json: Object): T source

Converts a provided object to JSON.

Params:

NameTypeAttributeDescription
json Object

Return:

T

The object from a json object

Public Methods

public toJSON(): Object source

Returns a JSON string representing the objcet

Return:

Object

A lossless JSON-convertable object.