PeterO.Cbor.PODOptions

## PeterO.Cbor.PODOptions

public class PODOptions

Options for controlling how certain DotNET or Java objects, such as so-called “plain old data” objects (better known as POCOs in DotNET or POJOs in Java), are converted to CBOR objects.

Member Summary

### PODOptions Constructor

public PODOptions(
    bool removeIsPrefix,
    bool useCamelCase);

Deprecated. Use the more readable string constructor instead.

Initializes a new instance of the PeterO.Cbor.PODOptions class.

Parameters:

### PODOptions Constructor

public PODOptions(
    string paramString);

Initializes a new instance of the PeterO.Cbor.PODOptions class.

Parameters:

Exceptions:

### PODOptions Constructor

public PODOptions();

Initializes a new instance of the PeterO.Cbor.PODOptions class with all the default options.

### Default

public static readonly PeterO.Cbor.PODOptions Default;

The default settings for “plain old data” options.

### UseCamelCase

public bool UseCamelCase { get; }

Gets a value indicating whether property, field, and method names are converted to camel case before they are used as keys. This option changes the behavior of key name serialization as follows. If “useCamelCase” is false :

If “useCamelCase” is true :

In the description above, a name “starts with” a word if that word begins the name and is followed by a character other than a basic digit or basic lower-case letter, that is, other than “a” to “z” or “0” to “9”.

Returns:

true If the names are converted to camel case; otherwise, false . This property is true by default.

### ToString

public override string ToString();

Gets the values of this options object’s properties in text form.

Return Value:

A text string containing the values of this options object’s properties. The format of the string is the same as the one described in the String constructor for this class.

Back to CBOR start page.