open62541 1.4.15
Open source implementation of OPC UA
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
cj5.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  cj5_token
 
struct  cj5_result
 
struct  cj5_options
 

Macros

#define CJ5_API
 

Typedefs

typedef enum cj5_token_type cj5_token_type
 
typedef enum cj5_error_code cj5_error_code
 
typedef struct cj5_token cj5_token
 
typedef struct cj5_result cj5_result
 
typedef struct cj5_options cj5_options
 

Enumerations

enum  cj5_token_type
 
enum  cj5_error_code
 

Functions

cj5_result cj5_parse (const char *json5, unsigned int len, cj5_token *tokens, unsigned int max_tokens, cj5_options *options)
 
cj5_error_code cj5_get_bool (const cj5_result *r, unsigned int tok_index, bool *out)
 
cj5_error_code cj5_get_float (const cj5_result *r, unsigned int tok_index, double *out)
 
cj5_error_code cj5_get_int (const cj5_result *r, unsigned int tok_index, int64_t *out)
 
cj5_error_code cj5_get_uint (const cj5_result *r, unsigned int tok_index, uint64_t *out)
 
cj5_error_code cj5_get_str (const cj5_result *r, unsigned int tok_index, char *buf, unsigned int *buflen)
 
void cj5_skip (const cj5_result *r, unsigned int *tok_index)
 
cj5_error_code cj5_find (const cj5_result *r, unsigned int *tok_index, const char *key)
 

Macro Definition Documentation

◆ CJ5_API

#define CJ5_API

Definition at line 75 of file cj5.h.

Typedef Documentation

◆ cj5_error_code

◆ cj5_options

typedef struct cj5_options cj5_options

◆ cj5_result

typedef struct cj5_result cj5_result

◆ cj5_token

typedef struct cj5_token cj5_token

◆ cj5_token_type

Enumeration Type Documentation

◆ cj5_error_code

Enumerator
CJ5_ERROR_NONE 
CJ5_ERROR_INVALID 
CJ5_ERROR_INCOMPLETE 
CJ5_ERROR_OVERFLOW 
CJ5_ERROR_NOTFOUND 

Definition at line 100 of file cj5.h.

◆ cj5_token_type

Enumerator
CJ5_TOKEN_OBJECT 
CJ5_TOKEN_ARRAY 
CJ5_TOKEN_NUMBER 
CJ5_TOKEN_STRING 
CJ5_TOKEN_BOOL 
CJ5_TOKEN_NULL 

Definition at line 91 of file cj5.h.

Function Documentation

◆ cj5_find()

cj5_error_code cj5_find ( const cj5_result r,
unsigned int *  tok_index,
const char *  key 
)

◆ cj5_get_bool()

cj5_error_code cj5_get_bool ( const cj5_result r,
unsigned int  tok_index,
bool *  out 
)

◆ cj5_get_float()

cj5_error_code cj5_get_float ( const cj5_result r,
unsigned int  tok_index,
double *  out 
)

◆ cj5_get_int()

cj5_error_code cj5_get_int ( const cj5_result r,
unsigned int  tok_index,
int64_t *  out 
)

◆ cj5_get_str()

cj5_error_code cj5_get_str ( const cj5_result r,
unsigned int  tok_index,
char *  buf,
unsigned int *  buflen 
)

◆ cj5_get_uint()

cj5_error_code cj5_get_uint ( const cj5_result r,
unsigned int  tok_index,
uint64_t *  out 
)

◆ cj5_parse()

cj5_result cj5_parse ( const char *  json5,
unsigned int  len,
cj5_token tokens,
unsigned int  max_tokens,
cj5_options options 
)

Options can be NULL.

◆ cj5_skip()

void cj5_skip ( const cj5_result r,
unsigned int *  tok_index 
)