You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.2.5] - 2026-06-11
9
+
10
+
### Added
11
+
- Added warning callback trigger when attempting to retrieve non-existent keys in `TJValueObject` using `try_get_string`, `get_*(..)`, or `get<>(..)` methods.
A lightweight and lightning-fast C++ JSON & JSON5 parser designed for high performance and minimal footprint.
8
8
@@ -131,8 +131,8 @@ The version is set in the `TinyJSON.h` file.
131
131
```cpp
132
132
staticconstshortTJ_VERSION_MAJOR = 0;
133
133
staticconstshortTJ_VERSION_MINOR = 2;
134
-
staticconstshortTJ_VERSION_PATCH = 4;
135
-
staticconstcharTJ_VERSION_STRING[] = "0.2.4";
134
+
staticconstshortTJ_VERSION_PATCH = 5;
135
+
staticconstcharTJ_VERSION_STRING[] = "0.2.5";
136
136
```
137
137
138
138
### Simple Value Access
@@ -169,6 +169,7 @@ if (tj) {
169
169
* json5_1_0_0
170
170
* Callback: (`callback_function:std::function<void(message_type, const TJCHAR*)>`) Callback function called where there is an error, warning etc.
171
171
NB: The Callback function is called even if Throw is false.
172
+
* If a getter method (`try_get_string`, `get_*(..)`, or `get<>(..)`) is called on a key that does not exist in a `TJValueObject`, a warning message indicating the missing key (e.g. `"The key 'missing' was not found!"`) is passed to the callback function.
172
173
* trace
173
174
* debug
174
175
* info
@@ -673,7 +674,7 @@ auto doubles = obj->get<std::vector<double>>("floats");
673
674
#### Strict Get values
674
675
675
676
676
-
Getter methods on `TJValue` (or through `TJValueObject` keys) can be used to retrieve specific types. By default, these methods are non-strict and return default values if the type is incorrect. By setting `strict: true` in `parse_options`, these methods will throw a `TJParseException` instead.
677
+
Getter methods on `TJValue` (or through `TJValueObject` keys) can be used to retrieve specific types. By default, these methods are non-strict and return default values if the type is incorrect. By setting `strict: true` in `parse_options`, these methods will throw a `TJParseException` instead. If a key is not found when calling `try_get_string`, `get_*(..)`, or `get<>(..)`, a warning callback is triggered with a message indicating the key that was not found (e.g. `"The key 'missing' was not found!"`) if a callback function is registered in `parse_options`.
0 commit comments