|
BDE 4.39.x Production Release
|
Provide an attribute class for JsonConverter "from" options.
Provide an attribute class for JsonConverter "from" options.
bdljsn::Json to bdlatThis component provides a single, simply constrained (value-semantic) attribute class, baljsn::ConvertFromJsonOptions, that is used to specify options for converting bdljsn::Json objects to bdlat-compliant objects.
maxDepth: maximum allowed depth of the Json source object. If exceeded, the conversion fails.skipUnknownElements: flag specifying if elements of the Json source object that are unknown to the bdlat object should be quietly skipped. If false any unknown element fails the conversion.The default values of maxDepth and skipUnknownElements are the same as the default values of the identically named baljsn::DecoderOptions options.
This section illustrates intended use of this component.
This component is designed to be used at a higher level to set the options for JSON conversion of bdlat objects. This example shows how to create and populate an options object.
First, we default-construct a baljsn::ConvertFromJsonOptions object:
Next, we populate that object with custom values: