aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDylan <boss@tehbox.org>2026-06-15 13:35:19 +1200
committerDylan <boss@tehbox.org>2026-06-15 13:36:43 +1200
commit04a88d83ab926b76682cd69f75386e0f9b6321f6 (patch)
tree54f26537160b0e282c056cacda25d60bcd1118ae /test
parent82a68f09ecf2440b22c2604fe207bbee1c5f4d3a (diff)
downloadtehjson-04a88d83ab926b76682cd69f75386e0f9b6321f6.tar.gz
tehjson-04a88d83ab926b76682cd69f75386e0f9b6321f6.zip
feat: Added readmeHEADmain
Diffstat (limited to 'test')
-rw-r--r--test/main.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/test/main.cpp b/test/main.cpp
index 9ed4bc6..44edacd 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -20,19 +20,14 @@ int main()
jsonWriter["test_false"].set(false);
jsonWriter["test_object"]["test_int"].set<int>(100);
jsonWriter["test_object"]["test_float"].set<float>(100);
+
+
+ jsonWriter["test_float"].get<float>() += 15;
+ jsonWriter["test_object"]["test_int"].get<int>() += 10;
std::string jsonString = jsonWriter.getSerialized();
cout << jsonString << endl;
- // TehJSON::Tokenizer tokenizer;
- // tokenizer.appendInput(jsonString);
- // std::vector<TehJSON::Token> tokens = tokenizer.tokenize();
-
- // for(const auto& token : tokens)
- // {
- // cout << TehJSON::getTokenName(token.type) << ": " << token.content << endl;
- // }
-
TehJSON::JSON jsonReader;
cout << "Reading: " << endl;
jsonReader.readFromString(jsonString);