JSON Voorhees
Killer JSON for C++
parse.hpp File Reference

Copyright (c) 2012-2014 by Travis Gockel. More...

#include <jsonv/config.hpp>
#include <jsonv/string_view.hpp>
#include <jsonv/value.hpp>
#include <cstddef>
#include <deque>
#include <stdexcept>

Go to the source code of this file.

Classes

class  jsonv::parse_error
 An error encountered when parsing. More...
 
struct  jsonv::parse_error::problem
 Description of a single parsing problem. More...
 
class  jsonv::parse_options
 Configuration for various parsing options. More...
 

Functions

JSONV_PUBLIC std::ostream & jsonv::operator<< (std::ostream &os, const parse_error::problem &p)
 Get a string representation of a problem. More...
 
JSONV_PUBLIC std::string jsonv::to_string (const parse_error::problem &p)
 Get a string representation of a problem. More...
 
JSONV_PUBLIC std::ostream & jsonv::operator<< (std::ostream &os, const parse_error &p)
 Get a string representation of a parse_error. More...
 
JSONV_PUBLIC std::string jsonv::to_string (const parse_error &p)
 Get a string representation of a parse_error. More...
 
value JSONV_PUBLIC jsonv::parse (std::istream &input, const parse_options &=parse_options())
 
value JSONV_PUBLIC jsonv::parse (const string_view &input, const parse_options &=parse_options())
 Construct a JSON value from the given input. More...
 
value JSONV_PUBLIC jsonv::parse (const char *begin, const char *end, const parse_options &=parse_options())
 Construct a JSON value from the given input in [begin, end). More...
 
value JSONV_PUBLIC jsonv::parse (tokenizer &input, const parse_options &=parse_options())
 

Detailed Description

Copyright (c) 2012-2014 by Travis Gockel.

All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the Apache License as published by the Apache Software Foundation, either version 2 of the License, or (at your option) any later version.

Author
Travis Gockel (travi.nosp@m.s@go.nosp@m.ckelh.nosp@m.ut.c.nosp@m.om)

Definition in file parse.hpp.

Function Documentation

JSONV_PUBLIC std::ostream& jsonv::operator<< ( std::ostream &  os,
const parse_error::problem p 
)

Get a string representation of a problem.

JSONV_PUBLIC std::ostream& jsonv::operator<< ( std::ostream &  os,
const parse_error p 
)

Get a string representation of a parse_error.

value JSONV_PUBLIC jsonv::parse ( const string_view input,
const parse_options = parse_options() 
)

Construct a JSON value from the given input.

Exceptions
parse_errorif an error is found in the JSON.
value JSONV_PUBLIC jsonv::parse ( const char *  begin,
const char *  end,
const parse_options = parse_options() 
)

Construct a JSON value from the given input in [begin, end).

Exceptions
parse_errorif an error is found in the JSON.
JSONV_PUBLIC std::string jsonv::to_string ( const parse_error::problem p)

Get a string representation of a problem.

JSONV_PUBLIC std::string jsonv::to_string ( const parse_error p)

Get a string representation of a parse_error.