///////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh)
//
// See accompanying file COPYING.TXT file for licensing details.
//
///////////////////////////////////////////////////////////////////////////////
#define CPPCMS_SOURCE
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "utf_iterator.h"
namespace cppcms {
namespace json {
static const size_t json_max_depth = 512;
bad_value_cast::bad_value_cast() : msg_("cppcms::json::bad_cast")
{
}
bad_value_cast::bad_value_cast(std::string const &s) : msg_("cppcms::json::bad_cast: "+s )
{
}
bad_value_cast::bad_value_cast(std::string const &s,json_type actual) :
msg_("cppcms::json::bad_cast: " + s)
{
std::ostringstream msg;
msg<<" error converting from "<
struct json_type_traits;
template<>
struct json_type_traits { static const json_type type=is_undefined; };
template<>
struct json_type_traits { static const json_type type=is_null; };
template<>
struct json_type_traits { static const json_type type=is_boolean; };
template<>
struct json_type_traits { static const json_type type=is_number; };
template<>
struct json_type_traits { static const json_type type=is_array; };
template<>
struct json_type_traits