Added toNetPacked() to JSON, removed DTSC::DTMI completely (now superseded by JSON).

This commit is contained in:
Thulinma 2012-08-24 11:32:02 +02:00
parent 4ac7c54698
commit a6b072988c
5 changed files with 113 additions and 411 deletions

View file

@ -6,6 +6,9 @@
#include <map>
#include <istream>
//empty definition of DTSC::Stream so it can be a friend.
namespace DTSC{class Stream;}
/// JSON-related classes and functions
namespace JSON{
@ -30,6 +33,8 @@ namespace JSON{
int c2hex(int c);
static void skipToEnd(std::istream & fromstream);
public:
//friends
friend class DTSC::Stream;//for access to strVal
//constructors
Value();
Value(std::istream & fromstream);
@ -60,6 +65,7 @@ namespace JSON{
Value & operator[](unsigned int i);
//handy functions and others
std::string toPacked();
std::string & toNetPacked();
std::string toString();
std::string toPrettyString(int indentation = 0);
void append(const Value & rhs);