Cthulhu  0.2.10
Cthulhu compiler collection
ctu::json::JsonParser Class Reference

a json parser More...

#include <json.hpp>

Public Member Functions

 JsonParser (arena_t *arena)
 create a json parser More...
 
Json parse (io_t *io)
 parse a json value parse the contents of an io object into a json value More...
 
logger_tget_logger () const
 get the logger More...
 

Detailed Description

a json parser

Definition at line 354 of file json.hpp.

Constructor & Destructor Documentation

◆ JsonParser()

JsonParser::JsonParser ( arena_t arena)

create a json parser

Parameters
arenathe arena to allocate memory from

Definition at line 133 of file json.cpp.

Member Function Documentation

◆ get_logger()

logger_t* ctu::json::JsonParser::get_logger ( ) const
inline

get the logger

Returns
the logger

Definition at line 376 of file json.hpp.

◆ parse()

Json JsonParser::parse ( io_t io)

parse a json value parse the contents of an io object into a json value

Note
if the parse fails, ctu::json::JsonParser::get_logger will contain error information
Parameters
iothe io object to parse
Returns
the parsed json value, invalid if the parse failed

Definition at line 138 of file json.cpp.


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