Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IJsonSerializer

Packages a dataframe ready for serialization to a JSON format text file.

Hierarchy

  • IJsonSerializer

Index

Methods

writeFile

  • writeFile(filePath: string): Promise<void>
  • Serialize the dataframe to the JSON data format and save it as a text file in the local file system. Asynchronous version using the Node.js 'fs' module.

    example
    
    await df.asJSON().writeFile("my-data-file.json");
    

    Parameters

    • filePath: string

      Specifies the path for the output file.

    Returns Promise<void>

    Returns a promise that resolves when the file has been written.

writeFileSync

  • writeFileSync(filePath: string): void
  • Serialize the dataframe to the JSON data format and save it as a text file in the local file system. Synchronous version using the Node.js 'fs' module.

    example
    
    df.asJSON().writeFileSync("my-data-file.json");
    

    Parameters

    • filePath: string

      Specifies the path for the output file.

    Returns void

Generated using TypeDoc