Load json into value using options.

Synopsis

Declared in <baljsn_jsonconverter.h>

template<class TYPE>
int
convert(
    TYPE* value,
    bdljsn::Json const& json,
    ConvertFromJsonOptions const& options = ConvertFromJsonOptions());

Description

Load to the specified value of (template parameter) TYPE the value of the specified json using the specified options. Return 0 on success and a non‐zero value otherwise. An error is returned if TYPE is not a top‐level Sequence, Choice, or Array. The prior value of value is reset.

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

value

object to load

json

JSON value to convert

options

conversion options

Created with MrDocs