JsonExtractor.Main

JSON main/top level object getter

Constructors

this
this(Parser json, GetField[cstring] get_named_fields, GetField[] get_indexed_fields)

Constructor, specifies getters for named and unnamed fields.

Members

Functions

parse
bool parse(cstring content)

Resets all type/value results and parses content, extracting types and values for the fields to extract.

Inherited Members

From GetObject

strict
bool strict;

If enabled, any unmatched field will result in an exception.

addNamedField
void addNamedField(cstring name, GetField field)

Add the field to the list of named objects to get.

removeNamedField
void removeNamedField(cstring name)

Remove a field from the list of named objects to get.

reset_
void reset_()

Called by super.reset() to reset all field getters.

set_
void set_()

Called by super.reset() to reset all field getters.

setField
bool setField(uint i, Type type, cstring name, cstring value)

Picks the field getter responsible for the field corresponding to name, or i if unnamed, and sets its type and value.

Meta