JSONProvider

A provider which will look for JSON key-value pairs based on matching them to the names of the fields in the provided struct.

Struct fields which are of a struct-type themselves are supported and are filled whenever json such as x.y is encountered. This means x is some field in the "outer" struct. Then because we have x.y, x MUST be of a struct type. Then we access the field named y in this "inner" struct

Constructors

this
this(string json)

Constructs a new JSON provider with the given input JSON to parse

Members

Functions

provideImpl
bool provideImpl(string n, string v)

Implementation

Inherited Members

From Provider

provideImpl
bool provideImpl(string n, string v_out)

The implementation method for a provider. This must return true when an entry by the name of n is found and then set its associated value via v_out. Otherwise, false must be returned.

provide
Optional!(string) provide(string name)

Provides us the value that maps to the given name

Meta