osgEarth 2.1.1
Classes | Namespaces | Defines | Enumerations | Functions

/home/cube/sources/osgearth/src/osgEarth/JsonUtils File Reference

#include "Common"
#include <utility>
#include <stdio.h>
#include <assert.h>
#include <iostream>
#include <stdexcept>
#include <stddef.h>
#include <deque>
#include <stack>
#include <string>
#include <vector>
#include <map>
Include dependency graph for JsonUtils:

Go to the source code of this file.

Classes

class  osgEarth::Json::StaticString
 Lightweight wrapper to tag static string. More...
class  osgEarth::Json::Value
 Represents a JSON value. More...
class  osgEarth::Json::Value::CZString
struct  osgEarth::Json::Value::CommentInfo
union  osgEarth::Json::Value::ValueHolder
class  osgEarth::Json::PathArgument
 Experimental and untested: represents an element of the "path" to access a node. More...
class  osgEarth::Json::Path
 Experimental and untested: represents a "path" to access a node. More...
class  osgEarth::Json::ValueAllocator
 Allocator to customize member name and string value memory management done by Value. More...
class  osgEarth::Json::ValueIteratorBase
 Experimental and untested: base class for Value iterators. More...
class  osgEarth::Json::ValueConstIterator
 Experimental and untested: const iterator for object and array value. More...
class  osgEarth::Json::ValueIterator
 Experimental and untested: iterator for object and array value. More...
class  osgEarth::Json::Writer
 Abstract class for writers. More...
class  osgEarth::Json::FastWriter
 Outputs a Value in JSON format without formatting (not human friendly). More...
class  osgEarth::Json::StyledWriter
 Writes a Value in JSON format in a human friendly way. More...
class  osgEarth::Json::StyledStreamWriter
 Writes a Value in JSON format in a human friendly way, to a stream rather than to a string. More...
class  osgEarth::Json::Reader
 Unserialize a JSON document into a Value. More...
class  osgEarth::Json::Reader::Token
class  osgEarth::Json::Reader::ErrorInfo

Namespaces

namespace  osgEarth
namespace  osgEarth::Json

Defines

#define OSGEARTH_JSONUTILS_H   1
#define JSON_API   OSGEARTH_EXPORT

Enumerations

enum  osgEarth::Json::ValueType {
  osgEarth::Json::nullValue = 0, osgEarth::Json::intValue, osgEarth::Json::uintValue, osgEarth::Json::realValue,
  osgEarth::Json::stringValue, osgEarth::Json::booleanValue, osgEarth::Json::arrayValue, osgEarth::Json::objectValue
}
 

Type of the value held by a Value object.

More...
enum  osgEarth::Json::CommentPlacement { osgEarth::Json::commentBefore = 0, osgEarth::Json::commentAfterOnSameLine, osgEarth::Json::commentAfter, osgEarth::Json::numberOfCommentPlacement }

Functions

std::string JSON_API osgEarth::Json::valueToString (Value::Int value)
std::string JSON_API osgEarth::Json::valueToString (Value::UInt value)
std::string JSON_API osgEarth::Json::valueToString (double value)
std::string JSON_API osgEarth::Json::valueToString (bool value)
std::string JSON_API osgEarth::Json::valueToQuotedString (const char *value)
std::ostream & osgEarth::Json::operator<< (std::ostream &, const Value &root)
 Output using the StyledStreamWriter.
std::istream & osgEarth::Json::operator>> (std::istream &, Value &)
 Read from 'sin' into 'root'.

Define Documentation

#define JSON_API   OSGEARTH_EXPORT

Definition at line 48 of file JsonUtils.

#define OSGEARTH_JSONUTILS_H   1

The code here and in JsonUtils.cpp is adapted from the "json-cpp" project, developed by Baptiste Lepilleur and put in the publi domain. Since the json-cpp project is relatively compact, and has not been updated in 3 years, we decided to simply incorporate it here instead of introducing another dependency.

TODO: probably move this into the osgEarth::Util namespace.

Definition at line 30 of file JsonUtils.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines