node-file-parser by Skelware

API Docs for: 2.2.2
Show:

json

Module: Parsers

Summary

Item Index

Methods

Methods

decode

Syntax

decode

(
  • [data]
)
Object

Summary

Decodes a JSON string to a JavaScript object.

Parameters:

  • [data] Object optional

    The JSON string to be decoded.

Returns:

Object:

An Object with the decoded data, or an empty object if something went wrong.

encode

Syntax

encode

(
  • [data]
)
String

Summary

Encodes any JavaScript object into a JSON string that can be written to a file.

Parameters:

  • [data] Object optional

    Any JavaScript object to be encoded.

Returns:

String:

A valid JSON representation of the data.

Parser

Syntax

Parser

()

Summary