Avro C#

Static Public Member Functions | List of all members
Avro.JsonHelper Class Reference

## Static Public Member Functions
static string | GetOptionalString (JToken jtok, string field)
| Retrieves the optional string property value for the given property name from the given JSON object. This throws an exception if property exists but it is not a string. More...
static string | GetRequiredString (JToken jtok, string field)
| Retrieves the required string property value for the given property name from the given JSON object. More...
static int | GetRequiredInteger (JToken jtok, string field)
| Retrieves the required int property value for the given property name from the given JSON object. More...
static ? bool | GetOptionalBoolean (JToken jtok, string field)
| Retrieves the optional boolean property value for the given property name from the given JSON object. More...

## Member Function Documentation

## ◆ GetOptionalBoolean()

static ? bool Avro.JsonHelper.GetOptionalBoolean | ( | JToken | jtok,
|  | string | field
| ) |  |
| inline static

Retrieves the optional boolean property value for the given property name from the given JSON object.

Parameters

  jtok | JSON object to read
  field | property name

Returns
  null if property doesn't exist, otherwise returns property boolean value

## ◆ GetOptionalString()

static string Avro.JsonHelper.GetOptionalString | ( | JToken | jtok,
|  | string | field
| ) |  |
| inline static

Retrieves the optional string property value for the given property name from the given JSON object. This throws an exception if property exists but it is not a string.

Parameters

  jtok | JSON object to read
  field | property name

Returns
  property value if property exists, null if property doesn't exist in the JSON object

## ◆ GetRequiredInteger()

static int Avro.JsonHelper.GetRequiredInteger | ( | JToken | jtok,
|  | string | field
| ) |  |
| inline static

Retrieves the required int property value for the given property name from the given JSON object.

Parameters

  jtok | JSON object to read
  field | property name

Returns
  property value

## ◆ GetRequiredString()

static string Avro.JsonHelper.GetRequiredString | ( | JToken | jtok,
|  | string | field
| ) |  |
| inline static

Retrieves the required string property value for the given property name from the given JSON object.

Parameters

  jtok | JSON object to read
  field | property name

Returns
  property value

The documentation for this class was generated from the following file:

- src/apache/main/Schema/JsonHelper.cs