API Docs for: 0.0.1
Show:

JSONParser Class

Extends Parser
Module: niviz

A JSON parser.

Constructor

JSONParser

(
  • [data='']
)

Parameters:

  • [data=''] String optional

    The data to parse.

Methods

end

() chainable

Inherited from Parser: lib/parser.js:176

This method must be called by the parsing methods when the parsing has finished.

parse

(
  • [callback]
)
Object

Inherited from Parser but overwritten in lib/parser.js:130

Starts the parsing process; in sync mode this method blocks until the parsing has finished, otherwise it should return immediately! If given a callback, it must be bound to the end and error events.

Parameters:

Returns:

Object: The parse result.

parse_profile

(
  • profile
)
chainable

Parsers a simple profile object and adds it to the parser's station.

Parameters:

parse_station

(
  • obj
)
chainable

Parsers a simple station object.

Parameters:

verify

() chainable

Inherited from Parser: lib/parser.js:165

Verify that all syntactic and semantic requirements are met by the parsed entity.

Properties

_parse

Unknown

data

Object

Inherited from Parser: lib/parser.js:50

result

Object

Inherited from Parser: lib/parser.js:56

station

Station

The snow station instance; the instance should be populated by the parsing methods and represents the parse result.