Awkward Array: ToJson Class Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ToJson Class Referenceabstract

`#include <json.h>`

Inheritance diagram for ToJson:

## Public Member Functions
virtual | ~ToJson ()
| Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted.
virtual void | null ()=0
| Append a `null` value.
virtual void | boolean (bool x)=0
| Append a boolean value `x`.
virtual void | integer (int64_t x)=0
| Append an integer value `x`.
virtual void | real (double x)=0
| Append a real value `x`.
virtual void | complex (std::complex< double > x)=0
| Append a complex value `x`.
virtual void | string (const char *x, int64_t length)=0
| Append a string value `x`.
virtual void | beginlist ()=0
| Begin a list.
virtual void | endlist ()=0
| End the current list.
virtual void | beginrecord ()=0
| Begin a record.
virtual void | field (const char *x)=0
| Insert a key for a key-value pair.
virtual void | endrecord ()=0
| End the current record.
virtual void | json (const char *data)=0
| Write raw JSON as a string.
void | string (const std::string &x)
| Append a string value `x`.
void | field (const std::string &x)
| Insert a key for a key-value pair.

## Detailed Description

Abstract base class for producing JSON data.

## Constructor & Destructor Documentation

## ◆ ~ToJson()

virtual ~ToJson | ( |  | ) |
| virtual

Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted.

## Member Function Documentation

## ◆ beginlist()

virtual void beginlist | ( |  | ) |
| pure virtual

Begin a list.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ beginrecord()

virtual void beginrecord | ( |  | ) |
| pure virtual

Begin a record.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ boolean()

virtual void boolean | ( | bool | x | ) |
| pure virtual

Append a boolean value `x`.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ complex()

virtual void complex | ( | std::complex< double > | x | ) |
| pure virtual

Append a complex value `x`.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ endlist()

virtual void endlist | ( |  | ) |
| pure virtual

End the current list.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ endrecord()

virtual void endrecord | ( |  | ) |
| pure virtual

End the current record.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ field() [1/2]

virtual void field | ( | const char * | x | ) |
| pure virtual

Insert a key for a key-value pair.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ field() [2/2]

void field | ( | const std::string & | x | ) |

Insert a key for a key-value pair.

## ◆ integer()

virtual void integer | ( | int64_t | x | ) |
| pure virtual

Append an integer value `x`.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ json()

virtual void json | ( | const char * | data | ) |
| pure virtual

Write raw JSON as a string.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ null()

virtual void null | ( |  | ) |
| pure virtual

Append a `null` value.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ real()

virtual void real | ( | double | x | ) |
| pure virtual

Append a real value `x`.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ string() [1/2]

virtual void string | ( | const char * | x,
|  | int64_t | length
| ) |  |
| pure virtual

Append a string value `x`.

Implemented in ToJsonString, ToJsonPrettyString, ToJsonFile, and ToJsonPrettyFile.

## ◆ string() [2/2]

void string | ( | const std::string & | x | ) |

Append a string value `x`.

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

- include/awkward/io/json.h