From b82c6e251b995353ce205bbd53f3db2b985c5345 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 23 Aug 2017 06:36:55 -0700 Subject: Fixed string constructor. --- src/unstable/json.cpp | 6 ++++++ src/unstable/json.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'src/unstable') diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp index d13f6e2..b22ca0d 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp @@ -19,6 +19,12 @@ Bu::Json::Json( const Bu::String &sValue ) : { } +Bu::Json::Json( const char *sValue ) : + eType( String ), + uDat( sValue ) +{ +} + Bu::Json::Json( double dValue ) : eType( Number ), uDat( dValue ) diff --git a/src/unstable/json.h b/src/unstable/json.h index 5a59b7e..6042f7d 100644 --- a/src/unstable/json.h +++ b/src/unstable/json.h @@ -33,6 +33,7 @@ namespace Bu public: Json(); Json( const Bu::String &sValue ); + Json( const char *sValue ); Json( double dValue ); Json( bool bValue ); Json( Type eType ); @@ -83,6 +84,8 @@ namespace Bu DatUnion() : pObject( NULL ) { } DatUnion( const Bu::String &sValue ) : pString( new Bu::String( sValue ) ) { } + DatUnion( const char *sValue ) : + pString( new Bu::String( sValue ) ) { } DatUnion( double dValue ) : dNumber( dValue ) { } DatUnion( bool bValue ) : bBoolean( bValue ) { } JsonHash *pObject; -- cgit v1.2.3