Home > @momentum-design/common > Json

Json class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Json class used for performing operations involving JSON Objects.

Signature:

declare class Json 

Properties

PropertyModifiersTypeDescription
CONSTANTS

readonly

static

typeof CONSTANTS(BETA) Constants associated with this class.

Methods

MethodModifiersDescription
read(target, encoding)static(BETA) Read a file as json at the provided target path.
write(target, data, tabSpacing)static(BETA) Write the provided data to the target path formatted as json.