diff options
author | Mike Buland <mbuland@penny-arcade.com> | 2017-08-30 14:31:28 -0700 |
---|---|---|
committer | Mike Buland <mbuland@penny-arcade.com> | 2017-08-30 14:31:28 -0700 |
commit | 317a740f0198085937bf4fdbf032cc481d20f4ed (patch) | |
tree | fb3eb538f1c75801d163870ccc2acc724e95f4a5 /src/unstable/json.cpp | |
parent | d5ff686220bde38bf7d1da55779a1bda9b771d53 (diff) | |
download | libbu++-317a740f0198085937bf4fdbf032cc481d20f4ed.tar.gz libbu++-317a740f0198085937bf4fdbf032cc481d20f4ed.tar.bz2 libbu++-317a740f0198085937bf4fdbf032cc481d20f4ed.tar.xz libbu++-317a740f0198085937bf4fdbf032cc481d20f4ed.zip |
Json now can take a UtfString as a text component.
It immedaitely converts it to UTF-8 and stores it for now, but later on
we may keep it longer, do some better validation, and have encoding
options.
Diffstat (limited to 'src/unstable/json.cpp')
-rw-r--r-- | src/unstable/json.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp index 5f6165c..6159ef3 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp | |||
@@ -13,6 +13,12 @@ Bu::Json::Json() : | |||
13 | { | 13 | { |
14 | } | 14 | } |
15 | 15 | ||
16 | Bu::Json::Json( const Bu::UtfString &sValue ) : | ||
17 | eType( String ), | ||
18 | uDat( sValue.get() ) | ||
19 | { | ||
20 | } | ||
21 | |||
16 | Bu::Json::Json( const Bu::String &sValue ) : | 22 | Bu::Json::Json( const Bu::String &sValue ) : |
17 | eType( String ), | 23 | eType( String ), |
18 | uDat( sValue ) | 24 | uDat( sValue ) |