WU Trading Library 0.2.0
A backtesting and trading strategy library
Loading...
Searching...
No Matches
json.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "wu.h"

Go to the source code of this file.

Functions

static void trim_line (char *line)
static bool read_line (WU_JsonReader reader)
static bool json_has_field (const char *json, const char *key)
static double json_get_number_value (const char *json, const char *key)
static long json_get_long_value (const char *json, const char *key)
static void * read_candle_json (WU_JsonReader reader)
static void * read_trade_json (WU_JsonReader reader)
static void * read_single_value_json (WU_JsonReader reader)
static void wu_json_reader_free (WU_JsonReader reader)
WU_JsonReader wu_json_reader_new (FILE *file, WU_DataType data_type, WU_TimeUnit time_units)

Function Documentation

◆ json_get_long_value()

long json_get_long_value ( const char * json,
const char * key )
static

Definition at line 54 of file json.c.

◆ json_get_number_value()

double json_get_number_value ( const char * json,
const char * key )
static

Definition at line 36 of file json.c.

◆ json_has_field()

bool json_has_field ( const char * json,
const char * key )
static

Definition at line 30 of file json.c.

◆ read_candle_json()

void * read_candle_json ( WU_JsonReader reader)
static

Definition at line 69 of file json.c.

◆ read_line()

bool read_line ( WU_JsonReader reader)
static

Definition at line 15 of file json.c.

◆ read_single_value_json()

void * read_single_value_json ( WU_JsonReader reader)
static

Definition at line 151 of file json.c.

◆ read_trade_json()

void * read_trade_json ( WU_JsonReader reader)
static

Definition at line 112 of file json.c.

◆ trim_line()

void trim_line ( char * line)
static

Definition at line 8 of file json.c.

◆ wu_json_reader_free()

void wu_json_reader_free ( WU_JsonReader reader)
static

Definition at line 184 of file json.c.

◆ wu_json_reader_new()

WU_JsonReader wu_json_reader_new ( FILE * file,
WU_DataType data_type,
WU_TimeUnit time_units )

Definition at line 189 of file json.c.